mirror of
https://github.com/nextcloud/docker.git
synced 2025-04-25 04:40:55 +02:00
Documentation and examples update for use with docker compose v2 (#2201)
* Update examples section according to the latest docker compose requirements. Signed-off-by: Kaloyan Nikolov <tzerber@gmail.com> * Minor readme updates to match the changes for the compose v2 syntax. Signed-off-by: Kaloyan Nikolov <tzerber@gmail.com> * Fix wrong environment variable Signed-off-by: Kaloyan Nikolov <tzerber@gmail.com> * Add missing headers to fpm config Signed-off-by: Kaloyan Nikolov <tzerber@gmail.com> * Fix cache control Signed-off-by: Kaloyan Nikolov <tzerber@gmail.com> * Add mjs file extension in a proper way. Signed-off-by: Kaloyan Nikolov <tzerber@gmail.com> * Typos fixed, minor clarification changes Signed-off-by: Kaloyan Nikolov <tzerber@gmail.com> * Removed logging from compose files. Signed-off-by: Kaloyan Nikolov <tzerber@gmail.com> * Restored MariaDB to 10.6 as per docs suggestions Signed-off-by: Kaloyan Nikolov <tzerber@gmail.com> * Remove extra nginx volume Signed-off-by: Kaloyan Nikolov <tzerber@gmail.com> * Removed GH specific markdown from Readme, change mariadb to recommended version Signed-off-by: Kaloyan Nikolov <tzerber@gmail.com> * typo Signed-off-by: Kaloyan Nikolov <tzerber@gmail.com> * Update .examples/docker-compose/with-nginx-proxy/postgres/apache/compose.yaml Signed-off-by: J0WI <J0WI@users.noreply.github.com> * Update to correct MariaDB command Signed-off-by: Kaloyan Nikolov <tzerber@gmail.com> * Updated compose files for mariadb to match current docs Signed-off-by: Kaloyan Nikolov <tzerber@gmail.com> * Update outdated docker-compose command in Readme Signed-off-by: Kaloyan Nikolov <tzerber@gmail.com> * Added back --log-bin to MariaDB command. See PR 1881 Signed-off-by: Kaloyan Nikolov <tzerber@gmail.com> * Remove wrongly added logging to Readme.MD Signed-off-by: Kaloyan Nikolov <tzerber@gmail.com> * Use proper name for --log-bin param Signed-off-by: Kaloyan Nikolov <tzerber@gmail.com> --------- Signed-off-by: Kaloyan Nikolov <tzerber@gmail.com> Signed-off-by: J0WI <J0WI@users.noreply.github.com> Co-authored-by: J0WI <J0WI@users.noreply.github.com>
This commit is contained in:
parent
9ff7b6a529
commit
38994cbb87
14 changed files with 144 additions and 154 deletions
|
@ -1,5 +1,3 @@
|
|||
version: '3'
|
||||
|
||||
services:
|
||||
db:
|
||||
image: mariadb:10.6
|
||||
|
@ -34,6 +32,10 @@ services:
|
|||
depends_on:
|
||||
- db
|
||||
- redis
|
||||
# Added proxy container dependency below.
|
||||
# It is unclear on when or why it happens, but sometimes NC manages to start before the proxy
|
||||
# and it breaks for whatever weird reason resulting in the need of manual proxy container restart.
|
||||
- proxy
|
||||
networks:
|
||||
- proxy-tier
|
||||
- default
|
||||
|
@ -55,11 +57,12 @@ services:
|
|||
- 80:80
|
||||
- 443:443
|
||||
labels:
|
||||
com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy: "true"
|
||||
- "com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy"
|
||||
volumes:
|
||||
- certs:/etc/nginx/certs:z,ro
|
||||
- certs:/etc/nginx/certs:ro,z
|
||||
- vhost.d:/etc/nginx/vhost.d:z
|
||||
- html:/usr/share/nginx/html:z
|
||||
- dhparam:/etc/nginx/dhparam:z
|
||||
- /var/run/docker.sock:/tmp/docker.sock:z,ro
|
||||
networks:
|
||||
- proxy-tier
|
||||
|
@ -67,6 +70,8 @@ services:
|
|||
letsencrypt-companion:
|
||||
image: nginxproxy/acme-companion
|
||||
restart: always
|
||||
environment:
|
||||
- DEFAULT_EMAIL=
|
||||
volumes:
|
||||
- certs:/etc/nginx/certs:z
|
||||
- acme:/etc/acme.sh:z
|
||||
|
@ -100,6 +105,7 @@ volumes:
|
|||
acme:
|
||||
vhost.d:
|
||||
html:
|
||||
dhparam:
|
||||
|
||||
networks:
|
||||
proxy-tier:
|
|
@ -1,5 +1,3 @@
|
|||
version: '3'
|
||||
|
||||
services:
|
||||
db:
|
||||
image: mariadb:10.6
|
||||
|
@ -31,6 +29,7 @@ services:
|
|||
depends_on:
|
||||
- db
|
||||
- redis
|
||||
- proxy
|
||||
|
||||
web:
|
||||
build: ./web
|
||||
|
@ -64,7 +63,7 @@ services:
|
|||
- 80:80
|
||||
- 443:443
|
||||
labels:
|
||||
com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy: "true"
|
||||
- "com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy"
|
||||
volumes:
|
||||
- certs:/etc/nginx/certs:z,ro
|
||||
- vhost.d:/etc/nginx/vhost.d:z
|
||||
|
@ -76,6 +75,8 @@ services:
|
|||
letsencrypt-companion:
|
||||
image: nginxproxy/acme-companion
|
||||
restart: always
|
||||
environment:
|
||||
- DEFAULT_EMAIL=
|
||||
volumes:
|
||||
- certs:/etc/nginx/certs:z
|
||||
- acme:/etc/acme.sh:z
|
|
@ -12,6 +12,9 @@ events {
|
|||
http {
|
||||
include mime.types;
|
||||
default_type application/octet-stream;
|
||||
types {
|
||||
text/javascript mjs;
|
||||
}
|
||||
|
||||
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
||||
'$status $body_bytes_sent "$http_referer" '
|
||||
|
@ -30,7 +33,7 @@ http {
|
|||
# Set the `immutable` cache control options only for assets with a cache busting `v` argument
|
||||
map $arg_v $asset_immutable {
|
||||
"" "";
|
||||
default "immutable";
|
||||
default ", immutable";
|
||||
}
|
||||
|
||||
#gzip on;
|
||||
|
@ -162,23 +165,16 @@ http {
|
|||
fastcgi_max_temp_file_size 0;
|
||||
}
|
||||
|
||||
# Javascript mimetype fixes for nginx
|
||||
# Note: The block below should be removed, and the js|mjs section should be
|
||||
# added to the block below this one. This is a temporary fix until Nginx
|
||||
# upstream fixes the js mime-type
|
||||
location ~* \.(?:js|mjs)$ {
|
||||
types {
|
||||
text/javascript js mjs;
|
||||
}
|
||||
try_files $uri /index.php$request_uri;
|
||||
add_header Cache-Control "public, max-age=15778463, $asset_immutable";
|
||||
access_log off;
|
||||
}
|
||||
|
||||
# Serve static files
|
||||
location ~ \.(?:css|svg|gif|png|jpg|ico|wasm|tflite|map|ogg|flac)$ {
|
||||
location ~ \.(?:css|js|mjs|svg|gif|png|jpg|ico|wasm|tflite|map|ogg|flac)$ {
|
||||
try_files $uri /index.php$request_uri;
|
||||
add_header Cache-Control "public, max-age=15778463, $asset_immutable";
|
||||
add_header Cache-Control "public, max-age=15778463$asset_immutable";
|
||||
add_header Referrer-Policy "no-referrer" always;
|
||||
add_header X-Content-Type-Options "nosniff" always;
|
||||
add_header X-Frame-Options "SAMEORIGIN" always;
|
||||
add_header X-Permitted-Cross-Domain-Policies "none" always;
|
||||
add_header X-Robots-Tag "noindex, nofollow" always;
|
||||
add_header X-XSS-Protection "1; mode=block" always;
|
||||
access_log off; # Optional: Don't log access to assets
|
||||
|
||||
location ~ \.wasm$ {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue