mirror of
https://github.com/nextcloud/docker.git
synced 2025-06-16 00:04:48 +02:00
Update examples section according to the latest docker compose requirements.
Signed-off-by: Kaloyan Nikolov <tzerber@gmail.com>
This commit is contained in:
parent
a1e93f429c
commit
6dc29f2a72
21 changed files with 675 additions and 148 deletions
|
@ -1,10 +1,12 @@
|
|||
version: '3'
|
||||
|
||||
services:
|
||||
db:
|
||||
image: mariadb:10.6
|
||||
command: --transaction-isolation=READ-COMMITTED --log-bin=binlog --binlog-format=ROW
|
||||
image: mariadb:10.8.2
|
||||
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW --innodb-read-only-compressed=OFF
|
||||
restart: always
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "50m"
|
||||
volumes:
|
||||
- db:/var/lib/mysql:Z
|
||||
environment:
|
||||
|
@ -21,6 +23,10 @@ services:
|
|||
app:
|
||||
image: nextcloud:apache
|
||||
restart: always
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "50m"
|
||||
ports:
|
||||
- 127.0.0.1:8080:80
|
||||
volumes:
|
||||
|
@ -37,6 +43,10 @@ services:
|
|||
cron:
|
||||
image: nextcloud:apache
|
||||
restart: always
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "50m"
|
||||
volumes:
|
||||
- nextcloud:/var/www/html:z
|
||||
entrypoint: /cron.sh
|
|
@ -1,10 +1,12 @@
|
|||
version: '3'
|
||||
|
||||
services:
|
||||
db:
|
||||
image: mariadb:10.6
|
||||
command: --transaction-isolation=READ-COMMITTED --log-bin=binlog --binlog-format=ROW
|
||||
image: mariadb:10.8.2
|
||||
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW --innodb-read-only-compressed=OFF
|
||||
restart: always
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "50m"
|
||||
volumes:
|
||||
- db:/var/lib/mysql:Z
|
||||
environment:
|
||||
|
@ -21,6 +23,10 @@ services:
|
|||
app:
|
||||
image: nextcloud:fpm-alpine
|
||||
restart: always
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "50m"
|
||||
volumes:
|
||||
- nextcloud:/var/www/html:z
|
||||
environment:
|
||||
|
@ -35,6 +41,10 @@ services:
|
|||
web:
|
||||
build: ./web
|
||||
restart: always
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "50m"
|
||||
ports:
|
||||
- 127.0.0.1:8080:80
|
||||
volumes:
|
||||
|
@ -45,6 +55,10 @@ services:
|
|||
cron:
|
||||
image: nextcloud:fpm-alpine
|
||||
restart: always
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "50m"
|
||||
volumes:
|
||||
- nextcloud:/var/www/html:z
|
||||
entrypoint: /cron.sh
|
|
@ -1,3 +1,4 @@
|
|||
FROM nginx:alpine
|
||||
|
||||
COPY nginx.conf /etc/nginx/nginx.conf
|
||||
COPY mime.types /etc/nginx/mime.types
|
||||
|
|
99
.examples/docker-compose/insecure/mariadb/fpm/web/mime.types
Normal file
99
.examples/docker-compose/insecure/mariadb/fpm/web/mime.types
Normal file
|
@ -0,0 +1,99 @@
|
|||
|
||||
types {
|
||||
text/html html htm shtml;
|
||||
text/css css;
|
||||
text/xml xml;
|
||||
image/gif gif;
|
||||
image/jpeg jpeg jpg;
|
||||
text/javascript mjs js;
|
||||
application/atom+xml atom;
|
||||
application/rss+xml rss;
|
||||
|
||||
text/mathml mml;
|
||||
text/plain txt;
|
||||
text/vnd.sun.j2me.app-descriptor jad;
|
||||
text/vnd.wap.wml wml;
|
||||
text/x-component htc;
|
||||
|
||||
image/avif avif;
|
||||
image/png png;
|
||||
image/svg+xml svg svgz;
|
||||
image/tiff tif tiff;
|
||||
image/vnd.wap.wbmp wbmp;
|
||||
image/webp webp;
|
||||
image/x-icon ico;
|
||||
image/x-jng jng;
|
||||
image/x-ms-bmp bmp;
|
||||
|
||||
font/woff woff;
|
||||
font/woff2 woff2;
|
||||
|
||||
application/java-archive jar war ear;
|
||||
application/json json;
|
||||
application/mac-binhex40 hqx;
|
||||
application/msword doc;
|
||||
application/pdf pdf;
|
||||
application/postscript ps eps ai;
|
||||
application/rtf rtf;
|
||||
application/vnd.apple.mpegurl m3u8;
|
||||
application/vnd.google-earth.kml+xml kml;
|
||||
application/vnd.google-earth.kmz kmz;
|
||||
application/vnd.ms-excel xls;
|
||||
application/vnd.ms-fontobject eot;
|
||||
application/vnd.ms-powerpoint ppt;
|
||||
application/vnd.oasis.opendocument.graphics odg;
|
||||
application/vnd.oasis.opendocument.presentation odp;
|
||||
application/vnd.oasis.opendocument.spreadsheet ods;
|
||||
application/vnd.oasis.opendocument.text odt;
|
||||
application/vnd.openxmlformats-officedocument.presentationml.presentation
|
||||
pptx;
|
||||
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
|
||||
xlsx;
|
||||
application/vnd.openxmlformats-officedocument.wordprocessingml.document
|
||||
docx;
|
||||
application/vnd.wap.wmlc wmlc;
|
||||
application/wasm wasm;
|
||||
application/x-7z-compressed 7z;
|
||||
application/x-cocoa cco;
|
||||
application/x-java-archive-diff jardiff;
|
||||
application/x-java-jnlp-file jnlp;
|
||||
application/x-makeself run;
|
||||
application/x-perl pl pm;
|
||||
application/x-pilot prc pdb;
|
||||
application/x-rar-compressed rar;
|
||||
application/x-redhat-package-manager rpm;
|
||||
application/x-sea sea;
|
||||
application/x-shockwave-flash swf;
|
||||
application/x-stuffit sit;
|
||||
application/x-tcl tcl tk;
|
||||
application/x-x509-ca-cert der pem crt;
|
||||
application/x-xpinstall xpi;
|
||||
application/xhtml+xml xhtml;
|
||||
application/xspf+xml xspf;
|
||||
application/zip zip;
|
||||
|
||||
application/octet-stream bin exe dll;
|
||||
application/octet-stream deb;
|
||||
application/octet-stream dmg;
|
||||
application/octet-stream iso img;
|
||||
application/octet-stream msi msp msm;
|
||||
|
||||
audio/midi mid midi kar;
|
||||
audio/mpeg mp3;
|
||||
audio/ogg ogg;
|
||||
audio/x-m4a m4a;
|
||||
audio/x-realaudio ra;
|
||||
|
||||
video/3gpp 3gpp 3gp;
|
||||
video/mp2t ts;
|
||||
video/mp4 mp4;
|
||||
video/mpeg mpeg mpg;
|
||||
video/quicktime mov;
|
||||
video/webm webm;
|
||||
video/x-flv flv;
|
||||
video/x-m4v m4v;
|
||||
video/x-mng mng;
|
||||
video/x-ms-asf asx asf;
|
||||
video/x-ms-wmv wmv;
|
||||
video/x-msvideo avi;
|
||||
}
|
|
@ -162,22 +162,8 @@ 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;
|
||||
}
|
||||
default_type "text/javascript";
|
||||
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|svg|js|mjs|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";
|
||||
access_log off; # Optional: Don't log access to assets
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
version: '3'
|
||||
|
||||
services:
|
||||
db:
|
||||
image: postgres:alpine
|
||||
restart: always
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "50m"
|
||||
volumes:
|
||||
- db:/var/lib/postgresql/data:Z
|
||||
env_file:
|
||||
|
@ -16,12 +18,16 @@ services:
|
|||
app:
|
||||
image: nextcloud:apache
|
||||
restart: always
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "50m"
|
||||
ports:
|
||||
- 127.0.0.1:8080:80
|
||||
volumes:
|
||||
- nextcloud:/var/www/html:z
|
||||
environment:
|
||||
- POSTGRES_HOST=db
|
||||
- MYSQL_HOST=db
|
||||
- REDIS_HOST=redis
|
||||
env_file:
|
||||
- db.env
|
||||
|
@ -32,6 +38,10 @@ services:
|
|||
cron:
|
||||
image: nextcloud:apache
|
||||
restart: always
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "50m"
|
||||
volumes:
|
||||
- nextcloud:/var/www/html:z
|
||||
entrypoint: /cron.sh
|
||||
|
@ -41,4 +51,4 @@ services:
|
|||
|
||||
volumes:
|
||||
db:
|
||||
nextcloud:
|
||||
nextcloud:
|
|
@ -1,11 +1,13 @@
|
|||
version: '3'
|
||||
|
||||
services:
|
||||
db:
|
||||
image: postgres:alpine
|
||||
restart: always
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "50m"
|
||||
volumes:
|
||||
- db:/var/lib/postgresql/data:z
|
||||
- db:/var/lib/postgresql/data:Z
|
||||
env_file:
|
||||
- db.env
|
||||
|
||||
|
@ -16,6 +18,10 @@ services:
|
|||
app:
|
||||
image: nextcloud:fpm-alpine
|
||||
restart: always
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "50m"
|
||||
volumes:
|
||||
- nextcloud:/var/www/html:z
|
||||
environment:
|
||||
|
@ -30,6 +36,10 @@ services:
|
|||
web:
|
||||
build: ./web
|
||||
restart: always
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "50m"
|
||||
ports:
|
||||
- 127.0.0.1:8080:80
|
||||
volumes:
|
||||
|
@ -40,6 +50,10 @@ services:
|
|||
cron:
|
||||
image: nextcloud:fpm-alpine
|
||||
restart: always
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "50m"
|
||||
volumes:
|
||||
- nextcloud:/var/www/html:z
|
||||
entrypoint: /cron.sh
|
|
@ -1,3 +1,4 @@
|
|||
FROM nginx:alpine
|
||||
|
||||
COPY nginx.conf /etc/nginx/nginx.conf
|
||||
COPY mime.types /etc/nginx/mime.types
|
||||
|
|
|
@ -0,0 +1,99 @@
|
|||
|
||||
types {
|
||||
text/html html htm shtml;
|
||||
text/css css;
|
||||
text/xml xml;
|
||||
image/gif gif;
|
||||
image/jpeg jpeg jpg;
|
||||
text/javascript mjs js;
|
||||
application/atom+xml atom;
|
||||
application/rss+xml rss;
|
||||
|
||||
text/mathml mml;
|
||||
text/plain txt;
|
||||
text/vnd.sun.j2me.app-descriptor jad;
|
||||
text/vnd.wap.wml wml;
|
||||
text/x-component htc;
|
||||
|
||||
image/avif avif;
|
||||
image/png png;
|
||||
image/svg+xml svg svgz;
|
||||
image/tiff tif tiff;
|
||||
image/vnd.wap.wbmp wbmp;
|
||||
image/webp webp;
|
||||
image/x-icon ico;
|
||||
image/x-jng jng;
|
||||
image/x-ms-bmp bmp;
|
||||
|
||||
font/woff woff;
|
||||
font/woff2 woff2;
|
||||
|
||||
application/java-archive jar war ear;
|
||||
application/json json;
|
||||
application/mac-binhex40 hqx;
|
||||
application/msword doc;
|
||||
application/pdf pdf;
|
||||
application/postscript ps eps ai;
|
||||
application/rtf rtf;
|
||||
application/vnd.apple.mpegurl m3u8;
|
||||
application/vnd.google-earth.kml+xml kml;
|
||||
application/vnd.google-earth.kmz kmz;
|
||||
application/vnd.ms-excel xls;
|
||||
application/vnd.ms-fontobject eot;
|
||||
application/vnd.ms-powerpoint ppt;
|
||||
application/vnd.oasis.opendocument.graphics odg;
|
||||
application/vnd.oasis.opendocument.presentation odp;
|
||||
application/vnd.oasis.opendocument.spreadsheet ods;
|
||||
application/vnd.oasis.opendocument.text odt;
|
||||
application/vnd.openxmlformats-officedocument.presentationml.presentation
|
||||
pptx;
|
||||
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
|
||||
xlsx;
|
||||
application/vnd.openxmlformats-officedocument.wordprocessingml.document
|
||||
docx;
|
||||
application/vnd.wap.wmlc wmlc;
|
||||
application/wasm wasm;
|
||||
application/x-7z-compressed 7z;
|
||||
application/x-cocoa cco;
|
||||
application/x-java-archive-diff jardiff;
|
||||
application/x-java-jnlp-file jnlp;
|
||||
application/x-makeself run;
|
||||
application/x-perl pl pm;
|
||||
application/x-pilot prc pdb;
|
||||
application/x-rar-compressed rar;
|
||||
application/x-redhat-package-manager rpm;
|
||||
application/x-sea sea;
|
||||
application/x-shockwave-flash swf;
|
||||
application/x-stuffit sit;
|
||||
application/x-tcl tcl tk;
|
||||
application/x-x509-ca-cert der pem crt;
|
||||
application/x-xpinstall xpi;
|
||||
application/xhtml+xml xhtml;
|
||||
application/xspf+xml xspf;
|
||||
application/zip zip;
|
||||
|
||||
application/octet-stream bin exe dll;
|
||||
application/octet-stream deb;
|
||||
application/octet-stream dmg;
|
||||
application/octet-stream iso img;
|
||||
application/octet-stream msi msp msm;
|
||||
|
||||
audio/midi mid midi kar;
|
||||
audio/mpeg mp3;
|
||||
audio/ogg ogg;
|
||||
audio/x-m4a m4a;
|
||||
audio/x-realaudio ra;
|
||||
|
||||
video/3gpp 3gpp 3gp;
|
||||
video/mp2t ts;
|
||||
video/mp4 mp4;
|
||||
video/mpeg mpeg mpg;
|
||||
video/quicktime mov;
|
||||
video/webm webm;
|
||||
video/x-flv flv;
|
||||
video/x-m4v m4v;
|
||||
video/x-mng mng;
|
||||
video/x-ms-asf asx asf;
|
||||
video/x-ms-wmv wmv;
|
||||
video/x-msvideo avi;
|
||||
}
|
|
@ -162,21 +162,8 @@ 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|svg|js|mjs|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";
|
||||
access_log off; # Optional: Don't log access to assets
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
version: '3'
|
||||
|
||||
services:
|
||||
db:
|
||||
image: mariadb:10.6
|
||||
command: --transaction-isolation=READ-COMMITTED --log-bin=binlog --binlog-format=ROW
|
||||
image: mariadb:10.8.2
|
||||
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW --innodb-read-only-compressed=OFF
|
||||
restart: always
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "50m"
|
||||
volumes:
|
||||
- db:/var/lib/mysql:Z
|
||||
environment:
|
||||
|
@ -21,6 +23,10 @@ services:
|
|||
app:
|
||||
image: nextcloud:apache
|
||||
restart: always
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "50m"
|
||||
volumes:
|
||||
- nextcloud:/var/www/html:z
|
||||
environment:
|
||||
|
@ -34,6 +40,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
|
||||
|
@ -41,6 +51,10 @@ services:
|
|||
cron:
|
||||
image: nextcloud:apache
|
||||
restart: always
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "50m"
|
||||
volumes:
|
||||
- nextcloud:/var/www/html:z
|
||||
entrypoint: /cron.sh
|
||||
|
@ -51,15 +65,20 @@ services:
|
|||
proxy:
|
||||
build: ./proxy
|
||||
restart: always
|
||||
# Logging to syslog, it's best when combining with fail2ban on the host.
|
||||
logging:
|
||||
driver: "syslog"
|
||||
ports:
|
||||
- 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
|
||||
- conf.d:/etc/nginx/conf.d:z
|
||||
- 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,9 +86,16 @@ services:
|
|||
letsencrypt-companion:
|
||||
image: nginxproxy/acme-companion
|
||||
restart: always
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "50m"
|
||||
environment:
|
||||
- DEFAULT_EMAIL=
|
||||
volumes:
|
||||
- certs:/etc/nginx/certs:z
|
||||
- acme:/etc/acme.sh:z
|
||||
- conf.d:/etc/nginx/conf.d:z
|
||||
- vhost.d:/etc/nginx/vhost.d:z
|
||||
- html:/usr/share/nginx/html:z
|
||||
- /var/run/docker.sock:/var/run/docker.sock:z,ro
|
||||
|
@ -100,6 +126,8 @@ volumes:
|
|||
acme:
|
||||
vhost.d:
|
||||
html:
|
||||
dhparam:
|
||||
conf.d:
|
||||
|
||||
networks:
|
||||
proxy-tier:
|
|
@ -1,10 +1,12 @@
|
|||
version: '3'
|
||||
|
||||
services:
|
||||
db:
|
||||
image: mariadb:10.6
|
||||
command: --transaction-isolation=READ-COMMITTED --log-bin=binlog --binlog-format=ROW
|
||||
image: mariadb:10.8.2
|
||||
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW --innodb-read-only-compressed=OFF
|
||||
restart: always
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "50m"
|
||||
volumes:
|
||||
- db:/var/lib/mysql:Z
|
||||
environment:
|
||||
|
@ -21,6 +23,10 @@ services:
|
|||
app:
|
||||
image: nextcloud:fpm-alpine
|
||||
restart: always
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "50m"
|
||||
volumes:
|
||||
- nextcloud:/var/www/html:z
|
||||
environment:
|
||||
|
@ -31,10 +37,15 @@ services:
|
|||
depends_on:
|
||||
- db
|
||||
- redis
|
||||
- proxy
|
||||
|
||||
web:
|
||||
build: ./web
|
||||
restart: always
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "50m"
|
||||
volumes:
|
||||
- nextcloud:/var/www/html:z,ro
|
||||
environment:
|
||||
|
@ -50,6 +61,10 @@ services:
|
|||
cron:
|
||||
image: nextcloud:fpm-alpine
|
||||
restart: always
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "50m"
|
||||
volumes:
|
||||
- nextcloud:/var/www/html:z
|
||||
entrypoint: /cron.sh
|
||||
|
@ -60,14 +75,17 @@ services:
|
|||
proxy:
|
||||
build: ./proxy
|
||||
restart: always
|
||||
logging:
|
||||
driver: "syslog"
|
||||
ports:
|
||||
- 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
|
||||
- conf.d:/etc/nginx/conf.d:z
|
||||
- html:/usr/share/nginx/html:z
|
||||
- /var/run/docker.sock:/tmp/docker.sock:z,ro
|
||||
networks:
|
||||
|
@ -76,9 +94,16 @@ services:
|
|||
letsencrypt-companion:
|
||||
image: nginxproxy/acme-companion
|
||||
restart: always
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "50m"
|
||||
environment:
|
||||
- DEFAULT_EMAIL=
|
||||
volumes:
|
||||
- certs:/etc/nginx/certs:z
|
||||
- acme:/etc/acme.sh:z
|
||||
- conf.d:/etc/nginx/conf.d:z
|
||||
- vhost.d:/etc/nginx/vhost.d:z
|
||||
- html:/usr/share/nginx/html:z
|
||||
- /var/run/docker.sock:/var/run/docker.sock:z,ro
|
||||
|
@ -108,6 +133,7 @@ volumes:
|
|||
certs:
|
||||
acme:
|
||||
vhost.d:
|
||||
conf.d:
|
||||
html:
|
||||
|
||||
networks:
|
|
@ -1,3 +1,4 @@
|
|||
FROM nginx:alpine
|
||||
|
||||
COPY nginx.conf /etc/nginx/nginx.conf
|
||||
COPY mime.types /etc/nginx/mime.types
|
||||
|
|
|
@ -0,0 +1,99 @@
|
|||
|
||||
types {
|
||||
text/html html htm shtml;
|
||||
text/css css;
|
||||
text/xml xml;
|
||||
image/gif gif;
|
||||
image/jpeg jpeg jpg;
|
||||
text/javascript mjs js;
|
||||
application/atom+xml atom;
|
||||
application/rss+xml rss;
|
||||
|
||||
text/mathml mml;
|
||||
text/plain txt;
|
||||
text/vnd.sun.j2me.app-descriptor jad;
|
||||
text/vnd.wap.wml wml;
|
||||
text/x-component htc;
|
||||
|
||||
image/avif avif;
|
||||
image/png png;
|
||||
image/svg+xml svg svgz;
|
||||
image/tiff tif tiff;
|
||||
image/vnd.wap.wbmp wbmp;
|
||||
image/webp webp;
|
||||
image/x-icon ico;
|
||||
image/x-jng jng;
|
||||
image/x-ms-bmp bmp;
|
||||
|
||||
font/woff woff;
|
||||
font/woff2 woff2;
|
||||
|
||||
application/java-archive jar war ear;
|
||||
application/json json;
|
||||
application/mac-binhex40 hqx;
|
||||
application/msword doc;
|
||||
application/pdf pdf;
|
||||
application/postscript ps eps ai;
|
||||
application/rtf rtf;
|
||||
application/vnd.apple.mpegurl m3u8;
|
||||
application/vnd.google-earth.kml+xml kml;
|
||||
application/vnd.google-earth.kmz kmz;
|
||||
application/vnd.ms-excel xls;
|
||||
application/vnd.ms-fontobject eot;
|
||||
application/vnd.ms-powerpoint ppt;
|
||||
application/vnd.oasis.opendocument.graphics odg;
|
||||
application/vnd.oasis.opendocument.presentation odp;
|
||||
application/vnd.oasis.opendocument.spreadsheet ods;
|
||||
application/vnd.oasis.opendocument.text odt;
|
||||
application/vnd.openxmlformats-officedocument.presentationml.presentation
|
||||
pptx;
|
||||
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
|
||||
xlsx;
|
||||
application/vnd.openxmlformats-officedocument.wordprocessingml.document
|
||||
docx;
|
||||
application/vnd.wap.wmlc wmlc;
|
||||
application/wasm wasm;
|
||||
application/x-7z-compressed 7z;
|
||||
application/x-cocoa cco;
|
||||
application/x-java-archive-diff jardiff;
|
||||
application/x-java-jnlp-file jnlp;
|
||||
application/x-makeself run;
|
||||
application/x-perl pl pm;
|
||||
application/x-pilot prc pdb;
|
||||
application/x-rar-compressed rar;
|
||||
application/x-redhat-package-manager rpm;
|
||||
application/x-sea sea;
|
||||
application/x-shockwave-flash swf;
|
||||
application/x-stuffit sit;
|
||||
application/x-tcl tcl tk;
|
||||
application/x-x509-ca-cert der pem crt;
|
||||
application/x-xpinstall xpi;
|
||||
application/xhtml+xml xhtml;
|
||||
application/xspf+xml xspf;
|
||||
application/zip zip;
|
||||
|
||||
application/octet-stream bin exe dll;
|
||||
application/octet-stream deb;
|
||||
application/octet-stream dmg;
|
||||
application/octet-stream iso img;
|
||||
application/octet-stream msi msp msm;
|
||||
|
||||
audio/midi mid midi kar;
|
||||
audio/mpeg mp3;
|
||||
audio/ogg ogg;
|
||||
audio/x-m4a m4a;
|
||||
audio/x-realaudio ra;
|
||||
|
||||
video/3gpp 3gpp 3gp;
|
||||
video/mp2t ts;
|
||||
video/mp4 mp4;
|
||||
video/mpeg mpeg mpg;
|
||||
video/quicktime mov;
|
||||
video/webm webm;
|
||||
video/x-flv flv;
|
||||
video/x-m4v m4v;
|
||||
video/x-mng mng;
|
||||
video/x-ms-asf asx asf;
|
||||
video/x-ms-wmv wmv;
|
||||
video/x-msvideo avi;
|
||||
}
|
|
@ -162,21 +162,8 @@ 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";
|
||||
access_log off; # Optional: Don't log access to assets
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
version: '3'
|
||||
|
||||
services:
|
||||
db:
|
||||
image: postgres:alpine
|
||||
restart: always
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "50m"
|
||||
volumes:
|
||||
- db:/var/lib/postgresql/data:Z
|
||||
env_file:
|
||||
|
@ -16,6 +18,10 @@ services:
|
|||
app:
|
||||
image: nextcloud:apache
|
||||
restart: always
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "50m"
|
||||
volumes:
|
||||
- nextcloud:/var/www/html:z
|
||||
environment:
|
||||
|
@ -29,6 +35,7 @@ services:
|
|||
depends_on:
|
||||
- db
|
||||
- redis
|
||||
- proxy
|
||||
networks:
|
||||
- proxy-tier
|
||||
- default
|
||||
|
@ -36,6 +43,10 @@ services:
|
|||
cron:
|
||||
image: nextcloud:apache
|
||||
restart: always
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "50m"
|
||||
volumes:
|
||||
- nextcloud:/var/www/html:z
|
||||
entrypoint: /cron.sh
|
||||
|
@ -46,13 +57,16 @@ services:
|
|||
proxy:
|
||||
build: ./proxy
|
||||
restart: always
|
||||
logging:
|
||||
driver: "syslog"
|
||||
ports:
|
||||
- 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
|
||||
- conf.d:/etc/nginx/conf.d:z
|
||||
- vhost.d:/etc/nginx/vhost.d:z
|
||||
- html:/usr/share/nginx/html:z
|
||||
- /var/run/docker.sock:/tmp/docker.sock:z,ro
|
||||
|
@ -65,6 +79,7 @@ services:
|
|||
volumes:
|
||||
- certs:/etc/nginx/certs:z
|
||||
- acme:/etc/acme.sh:z
|
||||
- conf.d:/etc/nginx/conf.d:z
|
||||
- vhost.d:/etc/nginx/vhost.d:z
|
||||
- html:/usr/share/nginx/html:z
|
||||
- /var/run/docker.sock:/var/run/docker.sock:z,ro
|
||||
|
@ -94,6 +109,7 @@ volumes:
|
|||
certs:
|
||||
acme:
|
||||
vhost.d:
|
||||
conf.d:
|
||||
html:
|
||||
|
||||
networks:
|
|
@ -4,6 +4,10 @@ services:
|
|||
db:
|
||||
image: postgres:alpine
|
||||
restart: always
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "50m"
|
||||
volumes:
|
||||
- db:/var/lib/postgresql/data:Z
|
||||
env_file:
|
||||
|
@ -16,6 +20,10 @@ services:
|
|||
app:
|
||||
image: nextcloud:fpm-alpine
|
||||
restart: always
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "50m"
|
||||
volumes:
|
||||
- nextcloud:/var/www/html:z
|
||||
environment:
|
||||
|
@ -26,10 +34,15 @@ services:
|
|||
depends_on:
|
||||
- db
|
||||
- redis
|
||||
- proxy
|
||||
|
||||
web:
|
||||
build: ./web
|
||||
restart: always
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "50m"
|
||||
volumes:
|
||||
- nextcloud:/var/www/html:z,ro
|
||||
environment:
|
||||
|
@ -45,6 +58,10 @@ services:
|
|||
cron:
|
||||
image: nextcloud:fpm-alpine
|
||||
restart: always
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "50m"
|
||||
volumes:
|
||||
- nextcloud:/var/www/html:z
|
||||
entrypoint: /cron.sh
|
||||
|
@ -55,13 +72,16 @@ services:
|
|||
proxy:
|
||||
build: ./proxy
|
||||
restart: always
|
||||
logging:
|
||||
driver: "syslog"
|
||||
ports:
|
||||
- 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
|
||||
- conf.d:/etc/nginx/conf.d:z
|
||||
- vhost.d:/etc/nginx/vhost.d:z
|
||||
- html:/usr/share/nginx/html:z
|
||||
- /var/run/docker.sock:/tmp/docker.sock:z,ro
|
||||
|
@ -71,12 +91,19 @@ services:
|
|||
letsencrypt-companion:
|
||||
image: nginxproxy/acme-companion
|
||||
restart: always
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "50m"
|
||||
volumes:
|
||||
- certs:/etc/nginx/certs:z
|
||||
- acme:/etc/acme.sh:z
|
||||
- conf.d:/etc/nginx/conf.d:z
|
||||
- vhost.d:/etc/nginx/vhost.d:z
|
||||
- html:/usr/share/nginx/html:z
|
||||
- /var/run/docker.sock:/var/run/docker.sock:z,ro
|
||||
environment:
|
||||
- DEFAULT_EMAIL=
|
||||
networks:
|
||||
- proxy-tier
|
||||
depends_on:
|
||||
|
@ -102,6 +129,7 @@ volumes:
|
|||
nextcloud:
|
||||
certs:
|
||||
acme:
|
||||
conf.d:
|
||||
vhost.d:
|
||||
html:
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
FROM nginx:alpine
|
||||
|
||||
COPY nginx.conf /etc/nginx/nginx.conf
|
||||
COPY mime.types /etc/nginx/mime.types
|
||||
|
|
|
@ -0,0 +1,99 @@
|
|||
|
||||
types {
|
||||
text/html html htm shtml;
|
||||
text/css css;
|
||||
text/xml xml;
|
||||
image/gif gif;
|
||||
image/jpeg jpeg jpg;
|
||||
text/javascript mjs js;
|
||||
application/atom+xml atom;
|
||||
application/rss+xml rss;
|
||||
|
||||
text/mathml mml;
|
||||
text/plain txt;
|
||||
text/vnd.sun.j2me.app-descriptor jad;
|
||||
text/vnd.wap.wml wml;
|
||||
text/x-component htc;
|
||||
|
||||
image/avif avif;
|
||||
image/png png;
|
||||
image/svg+xml svg svgz;
|
||||
image/tiff tif tiff;
|
||||
image/vnd.wap.wbmp wbmp;
|
||||
image/webp webp;
|
||||
image/x-icon ico;
|
||||
image/x-jng jng;
|
||||
image/x-ms-bmp bmp;
|
||||
|
||||
font/woff woff;
|
||||
font/woff2 woff2;
|
||||
|
||||
application/java-archive jar war ear;
|
||||
application/json json;
|
||||
application/mac-binhex40 hqx;
|
||||
application/msword doc;
|
||||
application/pdf pdf;
|
||||
application/postscript ps eps ai;
|
||||
application/rtf rtf;
|
||||
application/vnd.apple.mpegurl m3u8;
|
||||
application/vnd.google-earth.kml+xml kml;
|
||||
application/vnd.google-earth.kmz kmz;
|
||||
application/vnd.ms-excel xls;
|
||||
application/vnd.ms-fontobject eot;
|
||||
application/vnd.ms-powerpoint ppt;
|
||||
application/vnd.oasis.opendocument.graphics odg;
|
||||
application/vnd.oasis.opendocument.presentation odp;
|
||||
application/vnd.oasis.opendocument.spreadsheet ods;
|
||||
application/vnd.oasis.opendocument.text odt;
|
||||
application/vnd.openxmlformats-officedocument.presentationml.presentation
|
||||
pptx;
|
||||
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
|
||||
xlsx;
|
||||
application/vnd.openxmlformats-officedocument.wordprocessingml.document
|
||||
docx;
|
||||
application/vnd.wap.wmlc wmlc;
|
||||
application/wasm wasm;
|
||||
application/x-7z-compressed 7z;
|
||||
application/x-cocoa cco;
|
||||
application/x-java-archive-diff jardiff;
|
||||
application/x-java-jnlp-file jnlp;
|
||||
application/x-makeself run;
|
||||
application/x-perl pl pm;
|
||||
application/x-pilot prc pdb;
|
||||
application/x-rar-compressed rar;
|
||||
application/x-redhat-package-manager rpm;
|
||||
application/x-sea sea;
|
||||
application/x-shockwave-flash swf;
|
||||
application/x-stuffit sit;
|
||||
application/x-tcl tcl tk;
|
||||
application/x-x509-ca-cert der pem crt;
|
||||
application/x-xpinstall xpi;
|
||||
application/xhtml+xml xhtml;
|
||||
application/xspf+xml xspf;
|
||||
application/zip zip;
|
||||
|
||||
application/octet-stream bin exe dll;
|
||||
application/octet-stream deb;
|
||||
application/octet-stream dmg;
|
||||
application/octet-stream iso img;
|
||||
application/octet-stream msi msp msm;
|
||||
|
||||
audio/midi mid midi kar;
|
||||
audio/mpeg mp3;
|
||||
audio/ogg ogg;
|
||||
audio/x-m4a m4a;
|
||||
audio/x-realaudio ra;
|
||||
|
||||
video/3gpp 3gpp 3gp;
|
||||
video/mp2t ts;
|
||||
video/mp4 mp4;
|
||||
video/mpeg mpeg mpg;
|
||||
video/quicktime mov;
|
||||
video/webm webm;
|
||||
video/x-flv flv;
|
||||
video/x-m4v m4v;
|
||||
video/x-mng mng;
|
||||
video/x-ms-asf asx asf;
|
||||
video/x-ms-wmv wmv;
|
||||
video/x-msvideo avi;
|
||||
}
|
|
@ -162,21 +162,8 @@ 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|svg|js|mjs|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";
|
||||
access_log off; # Optional: Don't log access to assets
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue