mirror of
https://github.com/nextcloud/docker.git
synced 2025-03-15 19:05:09 +01:00
examples: Favor configs over builds
There doesn't seem to be a need to prefer building custom containers, just to add a config file, a need that is easily solved with compose configs. Configs are still managed through git, just no new container needs to be built, slightly simplifying things. Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
This commit is contained in:
parent
f2c8cb599e
commit
7a86f30009
22 changed files with 61 additions and 32 deletions
|
@ -33,7 +33,7 @@ services:
|
||||||
- redis
|
- redis
|
||||||
|
|
||||||
web:
|
web:
|
||||||
build: ./web
|
image: nginx:alpine
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- 127.0.0.1:8080:80
|
- 127.0.0.1:8080:80
|
||||||
|
@ -41,6 +41,9 @@ services:
|
||||||
- nextcloud:/var/www/html:z,ro
|
- nextcloud:/var/www/html:z,ro
|
||||||
depends_on:
|
depends_on:
|
||||||
- app
|
- app
|
||||||
|
configs:
|
||||||
|
- source: web
|
||||||
|
target: /etc/nginx/nginx.conf
|
||||||
|
|
||||||
cron:
|
cron:
|
||||||
image: nextcloud:fpm-alpine
|
image: nextcloud:fpm-alpine
|
||||||
|
@ -52,6 +55,10 @@ services:
|
||||||
- db
|
- db
|
||||||
- redis
|
- redis
|
||||||
|
|
||||||
|
configs:
|
||||||
|
web:
|
||||||
|
file: nginx.conf
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
db:
|
db:
|
||||||
nextcloud:
|
nextcloud:
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
FROM nginx:alpine
|
|
||||||
|
|
||||||
COPY nginx.conf /etc/nginx/nginx.conf
|
|
|
@ -28,7 +28,7 @@ services:
|
||||||
- redis
|
- redis
|
||||||
|
|
||||||
web:
|
web:
|
||||||
build: ./web
|
image: nginx:alpine
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- 127.0.0.1:8080:80
|
- 127.0.0.1:8080:80
|
||||||
|
@ -36,6 +36,9 @@ services:
|
||||||
- nextcloud:/var/www/html:z,ro
|
- nextcloud:/var/www/html:z,ro
|
||||||
depends_on:
|
depends_on:
|
||||||
- app
|
- app
|
||||||
|
configs:
|
||||||
|
- source: web
|
||||||
|
target: /etc/nginx/nginx.conf
|
||||||
|
|
||||||
cron:
|
cron:
|
||||||
image: nextcloud:fpm-alpine
|
image: nextcloud:fpm-alpine
|
||||||
|
@ -47,6 +50,11 @@ services:
|
||||||
- db
|
- db
|
||||||
- redis
|
- redis
|
||||||
|
|
||||||
|
configs:
|
||||||
|
web:
|
||||||
|
file: nginx.conf
|
||||||
|
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
db:
|
db:
|
||||||
nextcloud:
|
nextcloud:
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
FROM nginx:alpine
|
|
||||||
|
|
||||||
COPY nginx.conf /etc/nginx/nginx.conf
|
|
|
@ -49,13 +49,16 @@ services:
|
||||||
- redis
|
- redis
|
||||||
|
|
||||||
proxy:
|
proxy:
|
||||||
build: ./proxy
|
image: nginxproxy/nginx-proxy:alpine
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- 80:80
|
- 80:80
|
||||||
- 443:443
|
- 443:443
|
||||||
labels:
|
labels:
|
||||||
com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy: "true"
|
com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy: "true"
|
||||||
|
configs:
|
||||||
|
- source: proxy
|
||||||
|
target: /etc/nginx/conf.d/uploadsize.conf
|
||||||
volumes:
|
volumes:
|
||||||
- certs:/etc/nginx/certs:z,ro
|
- certs:/etc/nginx/certs:z,ro
|
||||||
- vhost.d:/etc/nginx/vhost.d:z
|
- vhost.d:/etc/nginx/vhost.d:z
|
||||||
|
@ -93,6 +96,10 @@ services:
|
||||||
# networks:
|
# networks:
|
||||||
# - proxy-tier
|
# - proxy-tier
|
||||||
|
|
||||||
|
configs:
|
||||||
|
proxy:
|
||||||
|
file: uploadsize.conf
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
db:
|
db:
|
||||||
nextcloud:
|
nextcloud:
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
FROM nginxproxy/nginx-proxy:alpine
|
|
||||||
|
|
||||||
COPY uploadsize.conf /etc/nginx/conf.d/uploadsize.conf
|
|
|
@ -33,8 +33,11 @@ services:
|
||||||
- redis
|
- redis
|
||||||
|
|
||||||
web:
|
web:
|
||||||
build: ./web
|
image: nginx:alpine
|
||||||
restart: always
|
restart: always
|
||||||
|
configs:
|
||||||
|
- source: web
|
||||||
|
target: /etc/nginx/nginx.conf
|
||||||
volumes:
|
volumes:
|
||||||
- nextcloud:/var/www/html:z,ro
|
- nextcloud:/var/www/html:z,ro
|
||||||
environment:
|
environment:
|
||||||
|
@ -58,13 +61,16 @@ services:
|
||||||
- redis
|
- redis
|
||||||
|
|
||||||
proxy:
|
proxy:
|
||||||
build: ./proxy
|
image: nginxproxy/nginx-proxy:alpine
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- 80:80
|
- 80:80
|
||||||
- 443:443
|
- 443:443
|
||||||
labels:
|
labels:
|
||||||
com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy: "true"
|
com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy: "true"
|
||||||
|
configs:
|
||||||
|
- source: proxy
|
||||||
|
target: /etc/nginx/conf.d/uploadsize.conf
|
||||||
volumes:
|
volumes:
|
||||||
- certs:/etc/nginx/certs:z,ro
|
- certs:/etc/nginx/certs:z,ro
|
||||||
- vhost.d:/etc/nginx/vhost.d:z
|
- vhost.d:/etc/nginx/vhost.d:z
|
||||||
|
@ -102,6 +108,12 @@ services:
|
||||||
# networks:
|
# networks:
|
||||||
# - proxy-tier
|
# - proxy-tier
|
||||||
|
|
||||||
|
configs:
|
||||||
|
proxy:
|
||||||
|
file: uploadsize.conf
|
||||||
|
web:
|
||||||
|
file: nginx.conf
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
db:
|
db:
|
||||||
nextcloud:
|
nextcloud:
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
FROM nginxproxy/nginx-proxy:alpine
|
|
||||||
|
|
||||||
COPY uploadsize.conf /etc/nginx/conf.d/uploadsize.conf
|
|
|
@ -1,3 +0,0 @@
|
||||||
FROM nginx:alpine
|
|
||||||
|
|
||||||
COPY nginx.conf /etc/nginx/nginx.conf
|
|
|
@ -44,13 +44,16 @@ services:
|
||||||
- redis
|
- redis
|
||||||
|
|
||||||
proxy:
|
proxy:
|
||||||
build: ./proxy
|
image: nginxproxy/nginx-proxy:alpine
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- 80:80
|
- 80:80
|
||||||
- 443:443
|
- 443:443
|
||||||
labels:
|
labels:
|
||||||
com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy: "true"
|
com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy: "true"
|
||||||
|
configs:
|
||||||
|
- source: proxy
|
||||||
|
target: /etc/nginx/conf.d/uploadsize.conf
|
||||||
volumes:
|
volumes:
|
||||||
- certs:/etc/nginx/certs:z,ro
|
- certs:/etc/nginx/certs:z,ro
|
||||||
- vhost.d:/etc/nginx/vhost.d:z
|
- vhost.d:/etc/nginx/vhost.d:z
|
||||||
|
@ -88,6 +91,10 @@ services:
|
||||||
# networks:
|
# networks:
|
||||||
# - proxy-tier
|
# - proxy-tier
|
||||||
|
|
||||||
|
configs:
|
||||||
|
proxy:
|
||||||
|
file: uploadsize.conf
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
db:
|
db:
|
||||||
nextcloud:
|
nextcloud:
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
FROM nginxproxy/nginx-proxy:alpine
|
|
||||||
|
|
||||||
COPY uploadsize.conf /etc/nginx/conf.d/uploadsize.conf
|
|
|
@ -28,8 +28,11 @@ services:
|
||||||
- redis
|
- redis
|
||||||
|
|
||||||
web:
|
web:
|
||||||
build: ./web
|
image: nginx:alpine
|
||||||
restart: always
|
restart: always
|
||||||
|
configs:
|
||||||
|
- source: web
|
||||||
|
target: /etc/nginx/nginx.conf
|
||||||
volumes:
|
volumes:
|
||||||
- nextcloud:/var/www/html:z,ro
|
- nextcloud:/var/www/html:z,ro
|
||||||
environment:
|
environment:
|
||||||
|
@ -53,13 +56,16 @@ services:
|
||||||
- redis
|
- redis
|
||||||
|
|
||||||
proxy:
|
proxy:
|
||||||
build: ./proxy
|
image: nginxproxy/nginx-proxy:alpine
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- 80:80
|
- 80:80
|
||||||
- 443:443
|
- 443:443
|
||||||
labels:
|
labels:
|
||||||
com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy: "true"
|
com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy: "true"
|
||||||
|
configs:
|
||||||
|
- source: proxy
|
||||||
|
target: /etc/nginx/conf.d/uploadsize.conf
|
||||||
volumes:
|
volumes:
|
||||||
- certs:/etc/nginx/certs:z,ro
|
- certs:/etc/nginx/certs:z,ro
|
||||||
- vhost.d:/etc/nginx/vhost.d:z
|
- vhost.d:/etc/nginx/vhost.d:z
|
||||||
|
@ -97,6 +103,12 @@ services:
|
||||||
# networks:
|
# networks:
|
||||||
# - proxy-tier
|
# - proxy-tier
|
||||||
|
|
||||||
|
configs:
|
||||||
|
proxy:
|
||||||
|
file: uploadsize.conf
|
||||||
|
web:
|
||||||
|
file: nginx.conf
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
db:
|
db:
|
||||||
nextcloud:
|
nextcloud:
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
FROM nginxproxy/nginx-proxy:alpine
|
|
||||||
|
|
||||||
COPY uploadsize.conf /etc/nginx/conf.d/uploadsize.conf
|
|
|
@ -1,3 +0,0 @@
|
||||||
FROM nginx:alpine
|
|
||||||
|
|
||||||
COPY nginx.conf /etc/nginx/nginx.conf
|
|
Loading…
Add table
Reference in a new issue