Skip to content

Commit

Permalink
Use root user in docker and fix nginx config
Browse files Browse the repository at this point in the history
  • Loading branch information
kumaranvpl committed Nov 11, 2024
1 parent e52bc88 commit d3efd04
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
10 changes: 5 additions & 5 deletions {{cookiecutter.project_slug}}/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ COPY deployment/firebase/* /app/
RUN pip install --upgrade pip && pip install --no-cache-dir -e "."

# Add user appuser with root permissions
RUN adduser --disabled-password --gecos '' appuser \
&& chown -R appuser /app \
&& chown -R appuser:appuser /etc/nginx/conf.d /var/log/nginx /var/lib/nginx \
&& touch /run/nginx.pid && chown -R appuser:appuser /run/nginx.pid
# RUN adduser --disabled-password --gecos '' appuser \
# && chown -R appuser /app \
# && chown -R appuser:appuser /etc/nginx/conf.d /var/log/nginx /var/lib/nginx \
# && touch /run/nginx.pid && chown -R appuser:appuser /run/nginx.pid

USER appuser
# USER appuser

EXPOSE 8000 8008 8888

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ server {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_redirect off;
proxy_buffering off;

Expand Down

0 comments on commit d3efd04

Please sign in to comment.