Skip to content

Commit

Permalink
Fix #57 - NGINX tmp permission issue & reorganize Dockerfile content
Browse files Browse the repository at this point in the history
  • Loading branch information
Bubka committed May 20, 2022
1 parent 3dc4e55 commit 990fca3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
13 changes: 6 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,7 @@ RUN apk add --update --no-cache \
# Runtime dependencies
php7-session php7-json php7-openssl \
# Nginx and PHP FPM to serve over HTTP
php7-fpm nginx \
&& \
# Clean up
rm /etc/nginx/nginx.conf && \
# Fix ownership to ${UID}:${GID}
chown -R ${UID}:${GID} /var/lib/nginx/
php7-fpm nginx

# PHP FPM configuration
# Change username and ownership in php-fpm pool config
Expand All @@ -73,7 +68,11 @@ RUN mkdir /run/php && \
chown ${UID}:${GID} /run/php /var/log/php7 && \
chmod 700 /run/php /var/log/php7

# Nginx configuration
# NGINX
# Clean up
RUN rm /etc/nginx/nginx.conf && \
chown -R ${UID}:${GID} /var/lib/nginx
# configuration
EXPOSE 8000/tcp
RUN touch /run/nginx/nginx.pid /var/lib/nginx/logs/error.log && \
chown ${UID}:${GID} /run/nginx/nginx.pid /var/lib/nginx/logs/error.log
Expand Down
1 change: 1 addition & 0 deletions docker/nginx.conf
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
events {}
http {
include mime.types;
client_body_temp_path /tmp 1 2;

access_log /dev/stdout;
error_log /dev/stderr;
Expand Down

0 comments on commit 990fca3

Please sign in to comment.