Skip to content

Commit 8a3322b

Browse files
authored
Fix permissions in dockerfile
1 parent 3376824 commit 8a3322b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,16 @@ COPY --from=builder /opt/venv /opt/venv
2222
COPY . .
2323
RUN python manage.py collectstatic --noinput && \
2424
rm -f /etc/nginx/sites-enabled/default && \
25-
chown -R nginxuser:nginxgroup /app
25+
mkdir -p /var/lib/nginx/body /var/lib/nginx/proxy /var/log/nginx /run/nginx && \
26+
chown -R nginxuser:nginxgroup /app /var/lib/nginx /var/log/nginx /run/nginx /etc/nginx
2627

2728
COPY nginx.conf /etc/nginx/nginx.conf
2829
COPY proxy_params /etc/nginx/proxy_params
2930
COPY entrypoint.sh /app/entrypoint.sh
3031
RUN chmod +x /app/entrypoint.sh
3132

33+
RUN chown nginxuser:nginxgroup /etc/nginx/nginx.conf /etc/nginx/proxy_params
34+
3235
EXPOSE 8080
3336
USER nginxuser
3437
ENTRYPOINT ["/app/entrypoint.sh"]

0 commit comments

Comments
 (0)