Skip to content

Commit

Permalink
added nginx direcrtly into image
Browse files Browse the repository at this point in the history
  • Loading branch information
fulanii committed Dec 17, 2024
1 parent 4526819 commit f0b577b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,15 @@ RUN chmod +x /app/entrypoint.sh
RUN touch /app/supervisord.log /app/supervisord.pid \
&& chown -R myuser:myuser /app

# Install NGINX
RUN apt-get update && apt-get install -y nginx && apt-get clean && rm -rf /var/lib/apt/lists/*

# Copy your custom nginx.conf file into the image
COPY nginx.conf /etc/nginx/nginx.conf

# Ensure correct permissions
RUN chmod 644 /etc/nginx/nginx.conf

# Switch to non-root user
USER myuser

Expand Down
9 changes: 9 additions & 0 deletions supervisord.conf
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
[supervisord]
nodaemon=true

[program:nginx]
command=/usr/sbin/nginx -g "daemon off;"
autostart=true
autorestart=true
stdout_logfile=/dev/stdout
stderr_logfile=/dev/stderr
stdout_logfile_maxbytes=0
stderr_logfile_maxbytes=0

[program:gunicorn]
command=gunicorn autoblue_django.wsgi:application --bind 0.0.0.0:8000 --workers=3 --threads=4
autorestart=true
Expand Down

0 comments on commit f0b577b

Please sign in to comment.