refactor(base): common anchor

This commit is contained in:
Didier Slof 2023-02-26 16:50:47 +01:00
parent 7b004d7372
commit 6be48129f6
Signed by: didier
GPG key ID: 01E71F18AA4398E5

View file

@ -5,44 +5,38 @@ networks:
proxy:
external: true
services:
proxy:
build:
context: custom/proxy
container_name: proxy
x-common: &common
restart: always
privileged: true
ports:
- 80:80
- 443:443
environment:
- DEFAULT_EMAIL=webmaster@faulty.nl
- DEFAULT_HOST=home.famslof.nl
volumes:
- /srv/.webcerts:/etc/nginx/certs:rw
- /srv/proxy/config/conf.d:/etc/nginx/conf.d
- /srv/proxy/other/vhost.d:/etc/nginx/vhost.d
- /srv/proxy/data/html:/usr/share/nginx/html
- /var/run/docker.sock:/tmp/docker.sock
labels:
- com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy=true
networks:
proxy:
services:
proxy:
<<: *common
build:
context: custom/proxy
container_name: proxy
privileged: true
ports:
- 80:80
- 443:443
labels:
- com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy=true
letsencrypt:
<<: *common
container_name: letsencrypt
restart: always
image: nginxproxy/acme-companion
depends_on:
- proxy
volumes:
- /srv/.webcerts:/etc/nginx/certs:rw
- /srv/proxy/config/conf.d:/etc/nginx/conf.d
- /srv/proxy/other/vhost.d:/etc/nginx/vhost.d
- /srv/proxy/data/html:/usr/share/nginx/html
- /var/run/docker.sock:/var/run/docker.sock:ro
environment:
- DEFAULT_EMAIL=webmaster@faulty.nl
- DEFAULT_HOST=home.famslof.nl
#- NGINX_DOCKER_GEN_CONTAINER=proxy
# profiles:
# - production
networks:
proxy: