mirror of
https://github.com/Bubka/2FAuth.git
synced 2024-12-25 16:39:13 +01:00
Fix #57 - NGINX tmp permission issue & reorganize Dockerfile content
This commit is contained in:
parent
3dc4e55efe
commit
990fca3912
13
Dockerfile
13
Dockerfile
@ -55,12 +55,7 @@ RUN apk add --update --no-cache \
|
|||||||
# Runtime dependencies
|
# Runtime dependencies
|
||||||
php7-session php7-json php7-openssl \
|
php7-session php7-json php7-openssl \
|
||||||
# Nginx and PHP FPM to serve over HTTP
|
# Nginx and PHP FPM to serve over HTTP
|
||||||
php7-fpm nginx \
|
php7-fpm nginx
|
||||||
&& \
|
|
||||||
# Clean up
|
|
||||||
rm /etc/nginx/nginx.conf && \
|
|
||||||
# Fix ownership to ${UID}:${GID}
|
|
||||||
chown -R ${UID}:${GID} /var/lib/nginx/
|
|
||||||
|
|
||||||
# PHP FPM configuration
|
# PHP FPM configuration
|
||||||
# Change username and ownership in php-fpm pool config
|
# Change username and ownership in php-fpm pool config
|
||||||
@ -73,7 +68,11 @@ RUN mkdir /run/php && \
|
|||||||
chown ${UID}:${GID} /run/php /var/log/php7 && \
|
chown ${UID}:${GID} /run/php /var/log/php7 && \
|
||||||
chmod 700 /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
|
EXPOSE 8000/tcp
|
||||||
RUN touch /run/nginx/nginx.pid /var/lib/nginx/logs/error.log && \
|
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
|
chown ${UID}:${GID} /run/nginx/nginx.pid /var/lib/nginx/logs/error.log
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
events {}
|
events {}
|
||||||
http {
|
http {
|
||||||
include mime.types;
|
include mime.types;
|
||||||
|
client_body_temp_path /tmp 1 2;
|
||||||
|
|
||||||
access_log /dev/stdout;
|
access_log /dev/stdout;
|
||||||
error_log /dev/stderr;
|
error_log /dev/stderr;
|
||||||
|
Loading…
Reference in New Issue
Block a user