blob: 603fdcaac422450cd8cf6b1a09c67ca27f73150e [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:
Nico Huberf4fbab52023-07-25 10:57:08 +000017 - kcnet
Nico Huber8cd50ee2023-06-24 15:35:16 +000018 - simpleidnet
Nico Hubera1a296f2023-06-25 10:07:07 +000019 - gerritnet
Nico Huber8cd50ee2023-06-24 15:35:16 +000020 volumes:
Nico Huber15edd772023-07-01 18:16:50 +000021 - ./certbot/www/:/var/www/certbot/:ro
Nico Huberd6528722023-07-01 14:38:39 +000022 - ./simpleid/identities/:/var/db/simpleid-templates/:ro
23 - ./simpleid/www/:/var/www/simpleid/:ro
Nico Huber15edd772023-07-01 18:16:50 +000024 - ./certs/:/etc/nginx/certs/:rw
Nico Huberd6528722023-07-01 14:38:39 +000025 - ./nginx/sa.conf:/etc/nginx/conf.d/sa.conf.template:ro
Nico Huber8cd50ee2023-06-24 15:35:16 +000026 - ./nginx/empty.conf:/etc/nginx/conf.d/default.conf:ro
27 - ./logs/nginx:/var/log/nginx/:rw
Nico Huber5d7a1cb2023-07-23 19:36:14 +000028 postgres:
29 build:
30 context: ./postgres/docker/
31 networks:
32 - dbnet
33 volumes:
34 - ./postgres/postgres.conf:/etc/postgresql/postgresql.conf:ro
35 - ./postgres/init.sh:/docker-entrypoint-initdb.d/init.sh:ro
36 - ./postgres/data/:/var/lib/postgresql/data/:rw
37 - ./postgres/passwd/:/tmp/passwd/:rw
Nico Huberf4fbab52023-07-25 10:57:08 +000038 keycloak:
39 build:
40 context: ./keycloak/docker/
41 args:
42 - KC_DB=postgres
43 networks:
44 - kcnet
45 - dbnet
46 env_file: environment
47 environment:
48 - KC_PROXY=edge
49 - KC_HOSTNAME_DEBUG=true
50 - KC_HOSTNAME_STRICT=true
51 - KC_HOSTNAME_STRICT_BACKCHANNEL=true
52 - KC_HOSTNAME_URL=https://id.${SA_PUBLIC_DOMAIN_NAME}/
53 - KC_HOSTNAME_ADMIN_URL=https://id.${SA_PUBLIC_DOMAIN_NAME}/
54 - KC_DB_USERNAME=keycloak
55 - KC_DB_URL_HOST=postgres
56 - KC_DB_URL=jdbc:postgresql://postgres/keycloak
57 - KC_DB_POOL_MAX_SIZE=16
58 - KEYCLOAK_ADMIN=deusarcadia
59 - KEYCLOAK_ADMIN_PASSWORD=arcanumhomini
60 volumes:
61 - ./postgres/passwd/keycloak/:/tmp/passwd/db/:ro
Nico Huber8cd50ee2023-06-24 15:35:16 +000062 simpleid:
63 build:
64 context: .
65 dockerfile: simpleid/Dockerfile
Nico Huberd6528722023-07-01 14:38:39 +000066 env_file: environment
Nico Huber8cd50ee2023-06-24 15:35:16 +000067 networks:
68 - simpleidnet
69 volumes:
70 - ./simpleid/cache/:/var/cache/simpleid/:rw
Nico Huberd6528722023-07-01 14:38:39 +000071 - ./simpleid/identities/:/var/db/simpleid-templates/:ro
Nico Huber8cd50ee2023-06-24 15:35:16 +000072 - ./simpleid/store/:/var/lib/simpleid/:rw
Nico Huberd6528722023-07-01 14:38:39 +000073 - ./simpleid/www/:/var/www/simpleid/:ro
Nico Huber8cd50ee2023-06-24 15:35:16 +000074 - ./logs/simpleid/:/var/log/:rw
Nico Hubera1a296f2023-06-25 10:07:07 +000075 gerrit:
76 build:
77 context: .
78 dockerfile: gerrit/Dockerfile
Nico Huber177e6102023-07-25 13:39:16 +000079 secrets:
80 - source : seed
81 mode: 0400
Nico Huberb650ed42023-07-20 17:08:54 +000082 hostname: review.${SA_PUBLIC_DOMAIN_NAME}
83 env_file:
84 - gerrit/environment
85 - environment
Nico Hubera1a296f2023-06-25 10:07:07 +000086 environment:
Nico Huberb650ed42023-07-20 17:08:54 +000087 - GERRIT_USER_EMAIL=gerrit@${SA_PUBLIC_DOMAIN_NAME}
Nico Hubera1a296f2023-06-25 10:07:07 +000088 - HTTPD_LISTEN_URL=proxy-https://*:8080/
Nico Huber3c7f1c02023-07-20 17:18:51 +000089 ports:
90 - "29418:29418"
Nico Hubera1a296f2023-06-25 10:07:07 +000091 networks:
92 - gerritnet
93 volumes:
94 - ./logs/gerrit/:/var/gerrit/logs/:rw
95 - ./gerrit/etc/:/var/gerrit/etc/:rw
96 - ./gerrit/db/:/var/gerrit/db/:rw
97 - ./gerrit/git/:/var/gerrit/git/:rw
98 - ./gerrit/index/:/var/gerrit/index/:rw
99 - ./gerrit/cache/:/var/gerrit/cache/:rw
Nico Huber54073102023-06-25 11:36:59 +0000100 - ./gerrit/gerrit-oauth-provider.jar:/var/gerrit/plugins/gerrit-oauth-provider.jar:ro
Nico Huber804b41b2023-07-02 15:53:42 +0000101 mailserver:
102 image: ghcr.io/docker-mailserver/docker-mailserver:12
Nico Huber177e6102023-07-25 13:39:16 +0000103 secrets:
104 - source : seed
105 mode: 0400
Nico Huber804b41b2023-07-02 15:53:42 +0000106 #container_name: mailserver
107 # Provide the FQDN of your mail server here (Your DNS MX record should point to this value)
108 hostname: mail.${SA_PUBLIC_DOMAIN_NAME}
109 env_file: mail/mailserver.env
110 # More information about the mail-server ports:
111 # https://docker-mailserver.github.io/docker-mailserver/latest/config/security/understanding-the-ports/
112 # To avoid conflicts with yaml base-60 float, DO NOT remove the quotation marks.
113 ports:
114 - "25:25" # SMTP (explicit TLS => STARTTLS)
115 - "143:143" # IMAP4 (explicit TLS => STARTTLS)
116 - "465:465" # ESMTP (implicit TLS)
117 - "587:587" # ESMTP (explicit TLS => STARTTLS)
118 - "993:993" # IMAP4 (implicit TLS)
Nico Huberb650ed42023-07-20 17:08:54 +0000119 networks:
120 - gerritnet
Nico Huberf4fbab52023-07-25 10:57:08 +0000121 - kcnet
Nico Huber804b41b2023-07-02 15:53:42 +0000122 volumes:
123 - ./logs/mail-supervisor/:/var/log/supervisor/:rw
124 - ./logs/mail/:/var/log/mail/:rw
Nico Huber49781a72023-07-02 16:29:22 +0000125 - ./certs/:/etc/letsencrypt/:ro
Nico Huber804b41b2023-07-02 15:53:42 +0000126 - ./mail/data/:/var/mail/:rw
127 - ./mail/state/:/var/mail-state/:rw
128 - ./mail/config/:/tmp/docker-mailserver/:rw
Nico Huber22aecea2023-07-19 01:39:58 +0000129 - ./mail/rspamd-override.d/:/etc/rspamd/override.d/:rw
Nico Huber804b41b2023-07-02 15:53:42 +0000130 - /etc/localtime:/etc/localtime:ro
131 restart: always
132 stop_grace_period: 1m
133 # Uncomment if using `ENABLE_FAIL2BAN=1`:
134 # cap_add:
135 # - NET_ADMIN
136 healthcheck:
137 test: "ss --listening --tcp | grep -P 'LISTEN.+:smtp' || exit 1"
138 timeout: 3s
139 retries: 0
Nico Huber8cd50ee2023-06-24 15:35:16 +0000140networks:
141 simpleidnet:
142 driver: bridge
Nico Huber4bc2bdd2023-07-01 22:33:36 +0000143 ipam:
144 config:
145 - subnet: 10.12.14.16/29
Nico Hubera1a296f2023-06-25 10:07:07 +0000146 gerritnet:
147 driver: bridge
Nico Huber4bc2bdd2023-07-01 22:33:36 +0000148 ipam:
149 config:
150 - subnet: 10.12.14.24/29
Nico Huber5d7a1cb2023-07-23 19:36:14 +0000151 dbnet:
152 driver: bridge
153 ipam:
154 config:
155 - subnet: 10.12.14.40/29
Nico Huberf4fbab52023-07-25 10:57:08 +0000156 kcnet:
157 driver: bridge
158 ipam:
159 config:
160 - subnet: 10.12.14.48/29
Nico Huber8d9f45e2023-07-25 13:22:32 +0000161secrets:
162 seed:
163 file: .seed