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: proxy:
external: true external: true
x-common: &common
restart: always
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
networks:
proxy:
services: services:
proxy: proxy:
<<: *common
build: build:
context: custom/proxy context: custom/proxy
container_name: proxy container_name: proxy
restart: always
privileged: true privileged: true
ports: ports:
- 80:80 - 80:80
- 443:443 - 443:443
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: labels:
- com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy=true - com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy=true
networks:
proxy:
letsencrypt: letsencrypt:
<<: *common
container_name: letsencrypt container_name: letsencrypt
restart: always
image: nginxproxy/acme-companion image: nginxproxy/acme-companion
depends_on: depends_on:
- proxy - 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: