Skip to content

Commit

Permalink
Correct Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
ArthurMitchell42 committed Feb 3, 2024
1 parent e91303e commit f63b4dd
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions nutcase/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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"]
Expand Down

0 comments on commit f63b4dd

Please sign in to comment.