Compare commits

...

3 Commits

Author SHA1 Message Date
3wc
d6b50b7485 Set user id for php fpm container
Ref #4

Hard-coded for the time being, pending a discussion about makefile
vs. other strategies for setting the id dynamically
2021-12-09 00:03:30 +02:00
3wc
7ced35ac8d properly ignore log files 2021-12-08 23:42:22 +02:00
3wc
7b56fd2488 Nginx.conf does need to live here after all 😕 2021-12-08 23:39:06 +02:00
3 changed files with 50 additions and 1 deletions

2
.gitignore vendored
View File

@ -11,7 +11,7 @@
/src/web/.htaccess /src/web/.htaccess
# Logs # Logs
/src/*.log /src/**/*.log
# Dotenv # Dotenv
/src/.env /src/.env

View File

@ -14,6 +14,7 @@ services:
php: php:
image: "thecoopcloud/wordpress:5.8.2-php7.4-fpm-bedrock" image: "thecoopcloud/wordpress:5.8.2-php7.4-fpm-bedrock"
working_dir: /app working_dir: /app
user: 1000:1000
volumes: volumes:
- ./src:/app:cached - ./src:/app:cached

48
nginx.conf Normal file
View File

@ -0,0 +1,48 @@
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
client_max_body_size 128M;
gzip on;
gzip_proxied any;
gzip_types text/plain text/xml text/css application/x-javascript;
gzip_vary on;
gzip_disable "MSIE [1-6]\.(?!.*SV1)";
sendfile on;
sendfile_max_chunk 512k;
root /app/web;
access_log off;
location / {
include /etc/nginx/mime.types;
root /app/web;
index index.html index.htm index.php;
try_files $uri $uri/ /index.php?q=$uri&$args;
}
location ~ .php$ {
include fastcgi.conf;
fastcgi_read_timeout 300;
fastcgi_pass php:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /app/web/$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_script_name;
fastcgi_param PHP_VALUE "error_log=/var/log/nginx/application_php_errors.log";
fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k;
include fastcgi_params;
}
}