dockerconfig/docker-compose.yaml

120 lines
2.6 KiB
YAML
Raw Normal View History

2022-11-05 10:45:43 +01:00
version: "3.8"
2022-10-29 12:07:29 +02:00
2022-10-30 11:25:25 +01:00
networks:
2022-11-05 10:45:43 +01:00
internalnet:
2022-11-06 10:41:10 +01:00
driver: bridge
enable_ipv6: false
2022-11-05 15:00:31 +01:00
2022-10-30 11:25:25 +01:00
2022-11-05 10:45:43 +01:00
x-mail: &defaults
env_file: local.env
networks:
- internalnet
2022-10-29 12:07:29 +02:00
services:
2022-11-05 10:45:43 +01:00
2022-11-06 10:41:10 +01:00
pgsqlserver:
2022-11-05 10:45:43 +01:00
<<: *defaults
container_name: pgsqlserver
2022-10-30 11:25:25 +01:00
image: postgres:15
volumes:
2022-11-12 16:54:48 +01:00
- sql_data:/var/lib/postgresql/data/:z
- ./config/pg-init-scripts:/docker-entrypoint-initdb.d:ro
2022-10-30 11:25:25 +01:00
restart: always
2022-11-12 16:54:48 +01:00
expose:
- "5432"
2022-10-30 11:25:25 +01:00
2022-11-05 10:45:43 +01:00
roundcubemail:
<<: *defaults
image: roundcube/roundcubemail:latest-fpm
2022-11-06 10:41:10 +01:00
container_name: roundcubemail
environment:
- ROUNDCUBEMAIL_DB_HOST=pgsqlserver
2022-11-12 16:54:48 +01:00
- VIRTUAL_HOST=zathura.leene.dev
- LETSENCRYPT_HOST=zathura.leene.dev
- LETSENCRYPT_EMAIL=admin@zathura.leene.dev
2022-10-30 11:25:25 +01:00
depends_on:
2022-11-06 10:41:10 +01:00
- pgsqlserver
2022-11-05 10:45:43 +01:00
links:
2022-11-06 10:41:10 +01:00
- pgsqlserver
2022-11-12 16:54:48 +01:00
expose:
- "9000"
2022-10-30 11:25:25 +01:00
volumes:
2022-11-12 16:54:48 +01:00
- nginx_html/roundcubemail:/var/www/html
2022-11-05 10:45:43 +01:00
mailserver:
2022-11-12 16:54:48 +01:00
build: ./config/mail
2022-11-05 10:45:43 +01:00
<<: *defaults
2022-11-06 10:41:10 +01:00
image: mailserver/docker-mailserver:latest
2022-11-05 10:45:43 +01:00
container_name: mailserver
hostname: mail
domainname: zathura.leene.dev
2022-10-30 11:25:25 +01:00
ports:
2022-11-05 10:45:43 +01:00
- "25:25"
- "143:143"
- "587:587"
- "993:993"
volumes:
2022-11-12 16:54:48 +01:00
- nginx_certs:/etc/letsencrypt/live/
- mail_data:/var/mail/:z
- mail_state:/var/mail-state/:z
- mail_config:/tmp/docker-mailserver/:z
2022-11-05 10:45:43 +01:00
- /etc/localtime:/etc/localtime:ro
cap_add:
- NET_ADMIN
depends_on:
- ddnsgd
restart: always
2022-11-12 16:54:48 +01:00
2022-11-05 15:00:31 +01:00
reverse-proxy:
<<: *defaults
image: nginxproxy/nginx-proxy
container_name: nginx-proxy
restart: always
ports:
- "80:80"
- "443:443"
volumes:
2022-11-12 16:54:48 +01:00
- nginx_dhparam:/etc/nginx/dhparam:z
- nginx_certs:/etc/nginx/certs/:z
- nginx_conf:/etc/nginx/conf.d/:z
- nginx_vhost:/etc/nginx/vhost.d/:z
- nginx_html:/usr/share/nginx/html/:z
- ./config/nginx/zathura.leene.dev_location:/etc/nginx/vhost.d/zathura.leene.dev_location:ro
2022-11-06 10:41:10 +01:00
- /var/run/docker.sock:/tmp/docker.sock:z
2022-11-05 15:00:31 +01:00
depends_on:
- ddnsgd
2022-11-05 10:45:43 +01:00
2022-11-12 16:54:48 +01:00
ddnsgd:
<<: *defaults
container_name: "ddnsgd"
image: "ghcr.io/dominickbrasileiro/ddnsgd"
restart: "always"
2022-11-05 15:00:31 +01:00
acme-companion:
2022-11-05 10:45:43 +01:00
<<: *defaults
2022-11-05 15:00:31 +01:00
image: nginxproxy/acme-companion
container_name: nginx-proxy-acme
2022-11-05 10:45:43 +01:00
restart: always
2022-11-05 15:00:31 +01:00
volumes_from:
- reverse-proxy
volumes:
2022-11-12 16:54:48 +01:00
- acme-state:/etc/acme.sh
2022-11-06 10:41:10 +01:00
- /var/run/docker.sock:/var/run/docker.sock:z
2022-10-30 11:25:25 +01:00
depends_on:
2022-11-05 15:00:31 +01:00
- ddnsgd
2022-11-12 16:54:48 +01:00
build: ./config/nginx
volumes:
sql_data:
acme-state:
nginx_certs:
nginx_dhparam:
nginx_html:
nginx_conf:
nginx_vhost:
mail_data:
mail_config:
mail_state: