commit 70782e4098232a15664d0fe6ce267055c019d910 Author: 3wc <3wc@doesthisthing.work> Date: Fri Dec 17 00:28:06 2021 +0200 Initial import diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..8fbabc9 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,13 @@ +--- +kind: pipeline +name: publish docker image +steps: + - name: build and publish + image: plugins/docker + settings: + username: + from_secret: docker_reg_username_coopcloud + password: + from_secret: docker_reg_passwd_coopcloud + repo: thecoopcloud/nginx + tag: 1.21.4-bedrock diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..c2f60ea --- /dev/null +++ b/Dockerfile @@ -0,0 +1,4 @@ +FROM nginx:1.21.4 +# TODO: use renovate-bot to send pull requests on upstream image updates + +COPY nginx.conf /etc/nginx/conf.d/default.conf diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..388ca70 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,7 @@ +--- +version: '3.1' + +services: + web: + build: . + image: thecoopcloud/nginx:1.21.4-bedrock diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..1d5f18c --- /dev/null +++ b/nginx.conf @@ -0,0 +1,46 @@ +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$ { + 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; + } +} +