dockerconfig/docker-compose.yaml

240 lines
6.2 KiB
YAML
Raw Normal View History

2022-11-18 11:05:32 +01:00
version: "3.8"
networks:
internalnet:
driver: bridge
enable_ipv6: false
2022-10-30 11:25:25 +01:00
2022-11-18 11:05:32 +01:00
x-mail: &defaults
2022-11-19 14:44:58 +01:00
restart: always
2022-11-18 11:05:32 +01:00
env_file: local.env
networks:
- internalnet
2022-10-29 12:07:29 +02:00
services:
2022-11-19 14:44:58 +01:00
hugo-html:
networks:
- internalnet
2022-11-19 14:44:58 +01:00
container_name: hugo-html
build:
context: ./config/hugo
args:
HUGO_BASE: lieuwe.${NGINX_HOST}
volumes:
- hugo_data:/public:z
- nginx_certs:/etc/letsencrypt/live:z
2022-11-18 11:05:32 +01:00
hugo-site:
<<: *defaults
container_name: hugo-site
2022-11-13 17:58:23 +01:00
image: nginx:alpine
2022-11-18 11:05:32 +01:00
environment:
- VIRTUAL_PORT=6262
- VIRTUAL_PROTO=http
2022-11-19 14:44:58 +01:00
- VIRTUAL_HOST=lieuwe.${NGINX_HOST}
2022-11-18 11:05:32 +01:00
- LETSENCRYPT_HOST=lieuwe.${NGINX_HOST}
2022-11-13 12:36:43 +01:00
volumes:
2022-11-19 14:44:58 +01:00
- hugo_data:/var/www/html:ro,z
2022-11-18 11:05:32 +01:00
- ./config/hugo/configure:/etc/nginx/templates/default.conf.template:ro,z
2022-11-19 14:44:58 +01:00
ports:
- "6262:6262"
2022-11-14 16:02:40 +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
2022-11-13 09:29:11 +01:00
environment:
2022-11-19 14:44:58 +01:00
- POSTGRES_MULTIPLE_DATABASES=gitea, roundcube, nextcloud
2022-11-13 11:32:34 +01:00
- POSTGRES_PASSWORD=${SQL_PSWD}
2022-10-30 11:25:25 +01:00
volumes:
2022-11-12 16:54:48 +01:00
- sql_data:/var/lib/postgresql/data/:z
2022-11-14 16:02:40 +01:00
- ./config/pg-init-scripts:/docker-entrypoint-initdb.d:ro,z
2022-11-19 14:44:58 +01:00
ports:
- "5432:5432"
nextcloud:
<<: *defaults
image: nextcloud:fpm
container_name: nextcloud
environment:
- VIRTUAL_HOST=nextcloud.${NGINX_HOST}
- VIRTUAL_PORT=9000
- LETSENCRYPT_HOST=nextcloud.${NGINX_HOST}
- POSTGRES_HOST=pgsqlserver
- POSTGRES_PORT=5432
- POSTGRES_DB=nextcloud
- POSTGRES_USER=nextcloud
- POSTGRES_PASSWORD=${SQL_PSWD}
- NEXTCLOUD_TRUSTED_DOMAINS=nextcloud.${NGINX_HOST}
- NEXTCLOUD_ADMIN_USER=penny
- NEXTCLOUD_ADMIN_PASSWORD=${SQL_PSWD}
- SMTP_HOST=mailserver
- SMTP_SECURE=tls
- SMTP_NAME=admin@${NGINX_HOST}
- SMTP_PASSWORD=${SQL_PSWD}
depends_on:
- pgsqlserver
links:
- pgsqlserver
2022-11-12 16:54:48 +01:00
expose:
2022-11-19 14:44:58 +01:00
- "9000"
volumes:
- nextcloud_data:/var/www/html:z
- nextcloud_data:/var/www/nextcloud:z
2022-10-30 11:25:25 +01:00
2022-11-13 09:29:11 +01:00
gitea:
<<: *defaults
container_name: gitea
image: gitea/gitea
environment:
2022-11-13 11:32:34 +01:00
- VIRTUAL_HOST=git.${NGINX_HOST}
2022-11-13 09:29:11 +01:00
- VIRTUAL_PORT=3000
2022-11-13 11:32:34 +01:00
- LETSENCRYPT_HOST=git.${NGINX_HOST}
- GITEA__mailer__PASSWD=${SQL_PSWD}
- GITEA__server__DOMAIN = git.${NGINX_HOST}
- GITEA__server__SSH_DOMAIN = git.${NGINX_HOST}
- GITEA__server__ROOT_URL = https://git.${NGINX_HOST}/
- GITEA__server__CERT_FILE = /etc/letsencrypt/live/git.${NGINX_HOST}.crt
- GITEA__server__KEY_FILE = /etc/letsencrypt/live/git.${NGINX_HOST}.key
2022-11-13 09:29:11 +01:00
volumes:
- gitea_data:/data:z
- nginx_certs:/etc/letsencrypt/live:ro,z
2022-11-13 09:29:11 +01:00
expose:
- "3000"
ports:
- "222:22"
depends_on:
- pgsqlserver
links:
- pgsqlserver
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:
2022-11-13 11:32:34 +01:00
- VIRTUAL_HOST=inbox.${NGINX_HOST}
2022-11-13 09:29:11 +01:00
- VIRTUAL_PORT=9000
2022-11-13 11:32:34 +01:00
- LETSENCRYPT_HOST=inbox.${NGINX_HOST}
- ROUNDCUBEMAIL_DB_HOST=pgsqlserver
- ROUNDCUBEMAIL_DEFAULT_HOST=tls://${NGINX_HOST}
- ROUNDCUBEMAIL_SMTP_SERVER=tls://${NGINX_HOST}
- ROUNDCUBEMAIL_DB_PASSWORD=${SQL_PSWD}
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-18 11:05:32 +01:00
expose:
2022-11-12 16:54:48 +01:00
- "9000"
2022-10-30 11:25:25 +01:00
volumes:
2022-11-13 10:19:12 +01:00
- mail_html:/var/www/html:z
2022-11-13 10:41:45 +01:00
- mail_html:/var/www/roundcube:z
2022-11-19 14:44:58 +01:00
- ./config/mail/config.php:/var/roundcube/config/${NGINX_HOST}.php:ro,z
2022-11-05 10:45:43 +01:00
mailserver:
<<: *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
2022-11-13 10:19:12 +01:00
hostname: inbox
2022-11-13 11:32:34 +01:00
domainname: ${NGINX_HOST}
environment:
- POSTMASTER_ADDRESS=admin@${NGINX_HOST}
- RELAY_PASSWORD=${SENDGRID_APIKEY}
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-19 14:44:58 +01:00
- nginx_certs:/etc/letsencrypt/live:ro,z
2022-11-12 16:54:48 +01:00
- 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
cap_add:
- NET_ADMIN
depends_on:
- ddnsgd
2022-11-05 15:00:31 +01:00
reverse-proxy:
<<: *defaults
image: nginxproxy/nginx-proxy
container_name: nginx-proxy
2022-11-13 11:32:34 +01:00
environment:
- DEFAULT_EMAIL=admin@${NGINX_HOST}
2022-11-05 15:00:31 +01:00
ports:
- "80:80"
- "443:443"
volumes:
2022-11-14 16:02:40 +01:00
- nginx_html:/usr/share/nginx/html:z
- nginx_conf:/etc/nginx/conf.d/:z
2022-11-12 16:54:48 +01:00
- nginx_dhparam:/etc/nginx/dhparam:z
- nginx_certs:/etc/nginx/certs/:z
- nginx_vhost:/etc/nginx/vhost.d/:z
2022-11-13 10:41:45 +01:00
- mail_html:/var/www/roundcube:z
2022-11-19 14:44:58 +01:00
- nextcloud_data:/var/www/nextcloud:z
2022-11-14 16:02:40 +01:00
- ./config/nginx/inbox_location:/etc/nginx/vhost.d/inbox.${NGINX_HOST}_location:ro,z
2022-11-19 14:44:58 +01:00
- ./config/nginx/nextcloud_location:/etc/nginx/vhost.d/nextcloud.${NGINX_HOST}_location:ro,z
- ./config/nginx/header_default:/etc/nginx/vhost.d/default:z
2022-11-14 16:02:40 +01:00
- /var/run/docker.sock:/tmp/docker.sock:ro,z
2022-11-05 15:00:31 +01:00
depends_on:
- ddnsgd
2022-11-05 10:45:43 +01:00
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
volumes_from:
- reverse-proxy
volumes:
2022-11-12 16:54:48 +01:00
- acme-state:/etc/acme.sh
2022-11-14 16:02:40 +01:00
- /var/run/docker.sock:/var/run/docker.sock:ro,z
2022-10-30 11:25:25 +01:00
depends_on:
2022-11-05 15:00:31 +01:00
- ddnsgd
2022-11-13 10:19:12 +01:00
2022-11-13 11:46:27 +01:00
ddnsgd:
<<: *defaults
container_name: "ddnsgd"
image: "ghcr.io/dominickbrasileiro/ddnsgd"
environment:
- HOSTNAME=${NGINX_HOST}
- USERNAME=${GDNS_USERNAME}
- PASSWORD=${GDNS_PASSWORD}
2022-11-13 11:46:27 +01:00
2022-11-19 18:55:06 +01:00
autodiscover:
<<: *defaults
2022-11-19 18:55:06 +01:00
image: monogramm/autodiscover-email-settings:latest
container_name: autodiscover
environment:
- VIRTUAL_HOST=autodiscover.${NGINX_HOST},autoconfig.${NGINX_HOST}
- VIRTUAL_PORT=8000
- LETSENCRYPT_HOST=autodiscover.${NGINX_HOST},autoconfig.${NGINX_HOST}
2022-11-19 18:55:06 +01:00
- DOMAIN=${NGINX_HOST}
- IMAP_HOST=mail.${NGINX_HOST}
- IMAP_PORT=993
- IMAP_SOCKET=SSL
- POP_HOST=mail.${NGINX_HOST}
- POP_PORT=995
- POP_SOCKET=SSL
- SMTP_HOST=mail.${NGINX_HOST}
- SMTP_PORT=587
- SMTP_SOCKET=STARTTLS
expose:
- "8000"
2022-11-12 16:54:48 +01:00
volumes:
acme-state:
2022-11-13 09:29:11 +01:00
gitea_data:
2022-11-19 14:44:58 +01:00
hugo_data:
nextcloud_data:
2022-11-12 16:54:48 +01:00
nginx_certs:
nginx_dhparam:
nginx_html:
nginx_conf:
nginx_vhost:
mail_data:
mail_config:
mail_state:
2022-11-13 10:19:12 +01:00
mail_html:
2022-11-13 09:29:11 +01:00
sql_data: