switching to unix socket for communication between nginx & php-fpm, improves performance and fixes #1
This commit is contained in:
parent
d2aa0d89eb
commit
14ea837229
@ -40,14 +40,13 @@ RUN \
|
||||
&& export GNUPGHOME="$(mktemp -d)" \
|
||||
&& gpg2 --list-public-keys || /bin/true \
|
||||
&& curl -s https://privatebin.info/key/rugk.asc | gpg2 --import - \
|
||||
&& rm -rf /var/www/* \
|
||||
&& cd /tmp \
|
||||
&& curl -Ls https://github.com/PrivateBin/PrivateBin/releases/download/${RELEASE}/PrivateBin-${RELEASE}.tar.gz.asc > PrivateBin-${RELEASE}.tar.gz.asc \
|
||||
&& curl -Ls https://github.com/PrivateBin/PrivateBin/archive/${RELEASE}.tar.gz > PrivateBin-${RELEASE}.tar.gz \
|
||||
&& gpg2 --verify PrivateBin-${RELEASE}.tar.gz.asc \
|
||||
&& tar -xzf PrivateBin-${RELEASE}.tar.gz \
|
||||
&& rm -rf /var/www \
|
||||
&& mv /tmp/PrivateBin-${RELEASE} /var/www \
|
||||
&& cd /var/www \
|
||||
&& tar -xzf /tmp/PrivateBin-${RELEASE}.tar.gz --strip 1 \
|
||||
&& rm *.md cfg/conf.sample.php \
|
||||
&& mv cfg /srv \
|
||||
&& mv lib /srv \
|
||||
@ -65,7 +64,7 @@ ADD etc/ /etc/
|
||||
ADD usr/ /usr/
|
||||
|
||||
# mark dirs as volumes that need to be writable, allows running the container --read-only
|
||||
VOLUME /srv/data /tmp /var/tmp /var/run /var/log
|
||||
VOLUME /srv/data /tmp /var/tmp /run /var/log
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
|
@ -11,7 +11,7 @@ server {
|
||||
|
||||
location ~ \.php$ {
|
||||
include /etc/nginx/location.d/*.conf;
|
||||
fastcgi_pass [::]:9000;
|
||||
fastcgi_pass unix:/run/php-fpm.sock;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
include fastcgi_params;
|
||||
|
5
usr/local/etc/php-fpm.d/50-socket.conf
Normal file
5
usr/local/etc/php-fpm.d/50-socket.conf
Normal file
@ -0,0 +1,5 @@
|
||||
[www]
|
||||
listen = /run/php-fpm.sock
|
||||
listen.owner = www-data
|
||||
listen.group = www-data
|
||||
listen.mode = 0660
|
Loading…
Reference in New Issue
Block a user