-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e91303e
commit f63b4dd
Showing
1 changed file
with
8 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,28 +2,28 @@ FROM python:3.11-bookworm | |
|
||
LABEL maintainer="Kronos443 <[email protected]>" | ||
|
||
COPY ./docker/install-nginx-debian.sh / | ||
COPY ./nutcase/docker/install-nginx-debian.sh / | ||
RUN bash /install-nginx-debian.sh | ||
|
||
# Install requirements | ||
COPY ./docker/requirements_core.txt /tmp/requirements_core.txt | ||
COPY ./nutcase/docker/requirements_core.txt /tmp/requirements_core.txt | ||
RUN pip install --no-cache-dir -r /tmp/requirements_core.txt | ||
|
||
EXPOSE 9995 | ||
|
||
# Remove default configuration from Nginx | ||
RUN rm /etc/nginx/conf.d/default.conf | ||
# Copy the base uWSGI ini file to enable default dynamic uwsgi process number | ||
COPY ./docker/uwsgi.ini /etc/uwsgi/ | ||
COPY ./nutcase/docker/uwsgi.ini /etc/uwsgi/ | ||
|
||
# Install Supervisord | ||
RUN apt-get update && apt-get install -y supervisor \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
# Custom Supervisord config | ||
COPY ./docker/supervisord.conf /etc/supervisor/conf.d/supervisord.conf | ||
COPY ./nutcase/docker/supervisord.conf /etc/supervisor/conf.d/supervisord.conf | ||
|
||
# Copy stop-supervisor.sh to kill the supervisor and substasks on app failure | ||
COPY ./docker/stop-supervisor.sh /etc/supervisor/stop-supervisor.sh | ||
COPY ./nutcase/docker/stop-supervisor.sh /etc/supervisor/stop-supervisor.sh | ||
RUN chmod +x /etc/supervisor/stop-supervisor.sh | ||
|
||
# Which uWSGI .ini file should be used, to make it customizable | ||
|
@@ -45,7 +45,7 @@ ENV NGINX_WORKER_PROCESSES 1 | |
ENV LISTEN_PORT 9995 | ||
|
||
# Copy start.sh script that will check for a /app/prestart.sh script and run it before starting the app | ||
COPY ./docker/start.sh /start.sh | ||
COPY ./nutcase/docker/start.sh /start.sh | ||
RUN chmod +x /start.sh | ||
|
||
# URL under which static (not modified by Python) files will be requested | ||
|
@@ -60,7 +60,7 @@ ENV STATIC_INDEX 0 | |
# Install app requirements | ||
|
||
# Add app | ||
COPY ./app /app | ||
COPY ./nutcase/app /app | ||
WORKDIR /app | ||
|
||
# RUN apt-get install nano | ||
|
@@ -73,7 +73,7 @@ RUN rm requirements.txt | |
ENV PYTHONPATH=/app | ||
|
||
# Copy the entrypoint that will generate Nginx additional configs | ||
COPY ./docker/entrypoint.sh /entrypoint.sh | ||
COPY ./nutcase/docker/entrypoint.sh /entrypoint.sh | ||
RUN chmod +x /entrypoint.sh | ||
|
||
ENTRYPOINT ["/entrypoint.sh"] | ||
|