1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-08-02 19:55:18 +02:00

refactor docker startup to use supervisord

This commit is contained in:
ClumsyAdmin 2025-03-21 12:02:23 -04:00
parent dbd417ca87
commit 4ccfa6e42c
4 changed files with 22 additions and 6 deletions

View file

@ -12,7 +12,7 @@ WORKDIR /code
# Install system dependencies (Nginx included)
RUN apt-get update \
&& apt-get install -y git postgresql-client gdal-bin libgdal-dev nginx \
&& apt-get install -y git postgresql-client gdal-bin libgdal-dev nginx supervisor \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
@ -31,6 +31,9 @@ COPY ./server /code/
# Copy Nginx configuration
COPY ./nginx.conf /etc/nginx/nginx.conf
# Copy Supervisor configuration
COPY ./supervisord.conf /etc/supervisor/conf.d/supervisord.conf
# Collect static files
RUN python3 manage.py collectstatic --noinput --verbosity 2
@ -41,5 +44,5 @@ RUN chmod +x /code/entrypoint.sh
# Expose ports for NGINX and Gunicorn
EXPOSE 80 8000
# Command to start Nginx and Gunicorn
CMD ["bash", "-c", "service nginx start && /code/entrypoint.sh"]
# Command to start Supervisor (which starts Nginx and Gunicorn)
CMD ["supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]