Refactor of rp/docker-compose.yml

Currently trying to generalize a bit more the compose files.
No need to keep the NFS mounts explicitly stated, as most of the
times just a small Docker native volume is needed for persistence.
This commit is contained in:
Davide Oddone 2023-03-21 22:22:26 +01:00
parent 1919071f08
commit 82ee98a7cc

View File

@ -1,10 +1,14 @@
x-logging:
&default-logging
driver: local
driver: syslog
options:
max-size: "1m"
max-file: "50"
# This requires two files in /etc/rsyslog.d
# https://www.loggly.com/use-cases/docker-syslog-logging-and-troubleshooting/
tag: "container_name/{{.Name}}"
labels: "${hostname}"
syslog-facility: # cron, local7, etc.
# Can be removed if not needed
x-opt-values:
&volume-opt
driver_opts: &options
@ -55,32 +59,20 @@ networks:
volumes:
acme:
<<: *volume-opt
driver_opts:
<<: *options
device: ":/mnt/path/nginx-proxy/acme"
certs:
<<: *volume-opt
driver_opts:
<<: *options
device: ":/mnt/path/nginx-proxy/certs"
conf:
<<: *volume-opt
driver_opts:
<<: *options
device: ":/mnt/path/nginx-proxy/conf"
html:
<<: *volume-opt
driver_opts:
<<: *options
device: ":/mnt/path/nginx-proxy/html"
passwords:
<<: *volume-opt
driver_opts:
<<: *options
device: ":/mnt/path/nginx-proxy/passwords"
vhost:
<<: *volume-opt
driver_opts:
<<: *options
device: ":/mnt/path/nginx-proxy/vhost"
# What if I want to use the x-opt-values:
# acme:
# <<: *volume-opt
# driver_opts:
# <<: *options
# device: ":/mnt/path/nginx-proxy/acme"
# o: "new_opts"
# type: "new_type"
#
# 'o' and 'type' can be redifined again or left at default