blob: 148b0c3ce155d60815eb32eea8f08987f126b590 [file] [log] [blame]
Nico Huber8cd50ee2023-06-24 15:35:16 +00001version: "3"
2services:
3 nginx:
Nico Huber38c14da2023-06-24 16:59:28 +00004 build:
5 context: .
6 dockerfile: nginx/Dockerfile
Nico Huberaa15aee2023-07-01 22:35:45 +00007 args:
8 - SELFSIGNED_REQ_HOST=${SA_PUBLIC_DOMAIN_NAME}
9 - SELFSIGNED_REQ_ALT_NAMES=DNS:${SA_PUBLIC_DOMAIN_NAME},
10 DNS:id.${SA_PUBLIC_DOMAIN_NAME}, DNS:mail.${SA_PUBLIC_DOMAIN_NAME},
11 DNS:review.${SA_PUBLIC_DOMAIN_NAME}
Nico Huberd6528722023-07-01 14:38:39 +000012 env_file: environment
Nico Huber8cd50ee2023-06-24 15:35:16 +000013 ports:
14 - "80:80"
Nico Huber38c14da2023-06-24 16:59:28 +000015 - "443:443"
Nico Huber8cd50ee2023-06-24 15:35:16 +000016 networks:
17 - simpleidnet
Nico Hubera1a296f2023-06-25 10:07:07 +000018 - gerritnet
Nico Huber8cd50ee2023-06-24 15:35:16 +000019 volumes:
Nico Huber15edd772023-07-01 18:16:50 +000020 - ./certbot/www/:/var/www/certbot/:ro
Nico Huberd6528722023-07-01 14:38:39 +000021 - ./simpleid/identities/:/var/db/simpleid-templates/:ro
22 - ./simpleid/www/:/var/www/simpleid/:ro
Nico Huber15edd772023-07-01 18:16:50 +000023 - ./certs/:/etc/nginx/certs/:rw
Nico Huberd6528722023-07-01 14:38:39 +000024 - ./nginx/sa.conf:/etc/nginx/conf.d/sa.conf.template:ro
Nico Huber8cd50ee2023-06-24 15:35:16 +000025 - ./nginx/empty.conf:/etc/nginx/conf.d/default.conf:ro
26 - ./logs/nginx:/var/log/nginx/:rw
Nico Huber5d7a1cb2023-07-23 19:36:14 +000027 postgres:
28 build:
29 context: ./postgres/docker/
30 networks:
31 - dbnet
32 volumes:
33 - ./postgres/postgres.conf:/etc/postgresql/postgresql.conf:ro
34 - ./postgres/init.sh:/docker-entrypoint-initdb.d/init.sh:ro
35 - ./postgres/data/:/var/lib/postgresql/data/:rw
36 - ./postgres/passwd/:/tmp/passwd/:rw
Nico Huber8cd50ee2023-06-24 15:35:16 +000037 simpleid:
38 build:
39 context: .
40 dockerfile: simpleid/Dockerfile
Nico Huberd6528722023-07-01 14:38:39 +000041 env_file: environment
Nico Huber8cd50ee2023-06-24 15:35:16 +000042 networks:
43 - simpleidnet
44 volumes:
45 - ./simpleid/cache/:/var/cache/simpleid/:rw
Nico Huberd6528722023-07-01 14:38:39 +000046 - ./simpleid/identities/:/var/db/simpleid-templates/:ro
Nico Huber8cd50ee2023-06-24 15:35:16 +000047 - ./simpleid/store/:/var/lib/simpleid/:rw
Nico Huberd6528722023-07-01 14:38:39 +000048 - ./simpleid/www/:/var/www/simpleid/:ro
Nico Huber8cd50ee2023-06-24 15:35:16 +000049 - ./logs/simpleid/:/var/log/:rw
Nico Hubera1a296f2023-06-25 10:07:07 +000050 gerrit:
51 build:
52 context: .
53 dockerfile: gerrit/Dockerfile
Nico Huberb650ed42023-07-20 17:08:54 +000054 hostname: review.${SA_PUBLIC_DOMAIN_NAME}
55 env_file:
56 - gerrit/environment
57 - environment
Nico Hubera1a296f2023-06-25 10:07:07 +000058 environment:
Nico Huberb650ed42023-07-20 17:08:54 +000059 - GERRIT_USER_EMAIL=gerrit@${SA_PUBLIC_DOMAIN_NAME}
Nico Hubera1a296f2023-06-25 10:07:07 +000060 - HTTPD_LISTEN_URL=proxy-https://*:8080/
Nico Huber3c7f1c02023-07-20 17:18:51 +000061 ports:
62 - "29418:29418"
Nico Hubera1a296f2023-06-25 10:07:07 +000063 networks:
64 - gerritnet
65 volumes:
66 - ./logs/gerrit/:/var/gerrit/logs/:rw
Nico Huberb650ed42023-07-20 17:08:54 +000067 - ./mail/passwd/gerrit/:/var/gerrit/passwd/:rw
Nico Hubera1a296f2023-06-25 10:07:07 +000068 - ./gerrit/etc/:/var/gerrit/etc/:rw
69 - ./gerrit/db/:/var/gerrit/db/:rw
70 - ./gerrit/git/:/var/gerrit/git/:rw
71 - ./gerrit/index/:/var/gerrit/index/:rw
72 - ./gerrit/cache/:/var/gerrit/cache/:rw
Nico Huber54073102023-06-25 11:36:59 +000073 - ./gerrit/gerrit-oauth-provider.jar:/var/gerrit/plugins/gerrit-oauth-provider.jar:ro
Nico Huber804b41b2023-07-02 15:53:42 +000074 mailserver:
75 image: ghcr.io/docker-mailserver/docker-mailserver:12
76 #container_name: mailserver
77 # Provide the FQDN of your mail server here (Your DNS MX record should point to this value)
78 hostname: mail.${SA_PUBLIC_DOMAIN_NAME}
79 env_file: mail/mailserver.env
80 # More information about the mail-server ports:
81 # https://docker-mailserver.github.io/docker-mailserver/latest/config/security/understanding-the-ports/
82 # To avoid conflicts with yaml base-60 float, DO NOT remove the quotation marks.
83 ports:
84 - "25:25" # SMTP (explicit TLS => STARTTLS)
85 - "143:143" # IMAP4 (explicit TLS => STARTTLS)
86 - "465:465" # ESMTP (implicit TLS)
87 - "587:587" # ESMTP (explicit TLS => STARTTLS)
88 - "993:993" # IMAP4 (implicit TLS)
Nico Huberb650ed42023-07-20 17:08:54 +000089 networks:
90 - gerritnet
Nico Huber804b41b2023-07-02 15:53:42 +000091 volumes:
92 - ./logs/mail-supervisor/:/var/log/supervisor/:rw
93 - ./logs/mail/:/var/log/mail/:rw
Nico Huber49781a72023-07-02 16:29:22 +000094 - ./certs/:/etc/letsencrypt/:ro
Nico Huberb650ed42023-07-20 17:08:54 +000095 - ./mail/passwd/:/tmp/passwd/:ro
Nico Huber804b41b2023-07-02 15:53:42 +000096 - ./mail/data/:/var/mail/:rw
97 - ./mail/state/:/var/mail-state/:rw
98 - ./mail/config/:/tmp/docker-mailserver/:rw
Nico Huber22aecea2023-07-19 01:39:58 +000099 - ./mail/rspamd-override.d/:/etc/rspamd/override.d/:rw
Nico Huber804b41b2023-07-02 15:53:42 +0000100 - /etc/localtime:/etc/localtime:ro
101 restart: always
102 stop_grace_period: 1m
103 # Uncomment if using `ENABLE_FAIL2BAN=1`:
104 # cap_add:
105 # - NET_ADMIN
106 healthcheck:
107 test: "ss --listening --tcp | grep -P 'LISTEN.+:smtp' || exit 1"
108 timeout: 3s
109 retries: 0
Nico Huber8cd50ee2023-06-24 15:35:16 +0000110networks:
111 simpleidnet:
112 driver: bridge
Nico Huber4bc2bdd2023-07-01 22:33:36 +0000113 ipam:
114 config:
115 - subnet: 10.12.14.16/29
Nico Hubera1a296f2023-06-25 10:07:07 +0000116 gerritnet:
117 driver: bridge
Nico Huber4bc2bdd2023-07-01 22:33:36 +0000118 ipam:
119 config:
120 - subnet: 10.12.14.24/29
Nico Huber5d7a1cb2023-07-23 19:36:14 +0000121 dbnet:
122 driver: bridge
123 ipam:
124 config:
125 - subnet: 10.12.14.40/29