blob: c87ce6abffe924d59717daa9c376f5b61073b06d [file] [log] [blame]
Nico Huber8cd50ee2023-06-24 15:35:16 +00001version: "3"
2services:
3 nginx:
Nico Huber38c14da2023-06-24 16:59:28 +00004 build:
Nico Huberba887d02023-07-25 16:59:06 +00005 context: ./nginx/
Nico Huberaa15aee2023-07-01 22:35:45 +00006 args:
7 - SELFSIGNED_REQ_HOST=${SA_PUBLIC_DOMAIN_NAME}
8 - SELFSIGNED_REQ_ALT_NAMES=DNS:${SA_PUBLIC_DOMAIN_NAME},
9 DNS:id.${SA_PUBLIC_DOMAIN_NAME}, DNS:mail.${SA_PUBLIC_DOMAIN_NAME},
10 DNS:review.${SA_PUBLIC_DOMAIN_NAME}
Nico Huberd6528722023-07-01 14:38:39 +000011 env_file: environment
Nico Huber8cd50ee2023-06-24 15:35:16 +000012 ports:
13 - "80:80"
Nico Huber38c14da2023-06-24 16:59:28 +000014 - "443:443"
Nico Huber8cd50ee2023-06-24 15:35:16 +000015 networks:
Nico Huberf4fbab52023-07-25 10:57:08 +000016 - kcnet
Nico Hubera1a296f2023-06-25 10:07:07 +000017 - gerritnet
Nico Huber8cd50ee2023-06-24 15:35:16 +000018 volumes:
Nico Huber15edd772023-07-01 18:16:50 +000019 - ./certbot/www/:/var/www/certbot/:ro
Nico Huber15edd772023-07-01 18:16:50 +000020 - ./certs/:/etc/nginx/certs/:rw
Nico Huber61433f32023-07-25 17:09:14 +000021 - ./nginx/sa.conf:/etc/nginx/conf.d/default.conf.template:ro
22 - ./nginx/id.sa.conf:/etc/nginx/conf.d/id.sa.conf.template:ro
23 - ./nginx/review.sa.conf:/etc/nginx/conf.d/review.sa.conf.template:ro
Nico Huber8cd50ee2023-06-24 15:35:16 +000024 - ./logs/nginx:/var/log/nginx/:rw
Nico Huber5d7a1cb2023-07-23 19:36:14 +000025 postgres:
26 build:
27 context: ./postgres/docker/
Nico Huber472cfc72023-07-25 14:20:55 +000028 secrets:
29 - seed
Nico Huber5d7a1cb2023-07-23 19:36:14 +000030 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
Nico Huberf4fbab52023-07-25 10:57:08 +000036 keycloak:
37 build:
38 context: ./keycloak/docker/
39 args:
40 - KC_DB=postgres
Nico Huber472cfc72023-07-25 14:20:55 +000041 secrets:
42 - source : seed
43 mode: 0400
Nico Huberf4fbab52023-07-25 10:57:08 +000044 networks:
45 - kcnet
46 - dbnet
47 env_file: environment
48 environment:
49 - KC_PROXY=edge
50 - KC_HOSTNAME_DEBUG=true
51 - KC_HOSTNAME_STRICT=true
52 - KC_HOSTNAME_STRICT_BACKCHANNEL=true
53 - KC_HOSTNAME_URL=https://id.${SA_PUBLIC_DOMAIN_NAME}/
54 - KC_HOSTNAME_ADMIN_URL=https://id.${SA_PUBLIC_DOMAIN_NAME}/
55 - KC_DB_USERNAME=keycloak
56 - KC_DB_URL_HOST=postgres
57 - KC_DB_URL=jdbc:postgresql://postgres/keycloak
58 - KC_DB_POOL_MAX_SIZE=16
59 - KEYCLOAK_ADMIN=deusarcadia
60 - KEYCLOAK_ADMIN_PASSWORD=arcanumhomini
Nico Huber7f8dc5b2023-07-25 16:48:01 +000061 keycloak-init-realm:
62 depends_on:
63 - keycloak
64 build:
65 context: ./keycloak/init/
66 env_file:
67 - keycloak/environment
68 - environment
69 environment:
70 - KEYCLOAK_ADMIN=deusarcadia
71 - KEYCLOAK_ADMIN_PASSWORD=arcanumhomini
72 networks:
73 - kcnet
74 secrets:
75 - seed
Nico Hubera1a296f2023-06-25 10:07:07 +000076 gerrit:
77 build:
78 context: .
79 dockerfile: gerrit/Dockerfile
Nico Huber177e6102023-07-25 13:39:16 +000080 secrets:
81 - source : seed
82 mode: 0400
Nico Huberb650ed42023-07-20 17:08:54 +000083 hostname: review.${SA_PUBLIC_DOMAIN_NAME}
84 env_file:
85 - gerrit/environment
86 - environment
Nico Hubera1a296f2023-06-25 10:07:07 +000087 environment:
Nico Huberb650ed42023-07-20 17:08:54 +000088 - GERRIT_USER_EMAIL=gerrit@${SA_PUBLIC_DOMAIN_NAME}
Nico Hubera1a296f2023-06-25 10:07:07 +000089 - HTTPD_LISTEN_URL=proxy-https://*:8080/
Nico Huber3c7f1c02023-07-20 17:18:51 +000090 ports:
91 - "29418:29418"
Nico Hubera1a296f2023-06-25 10:07:07 +000092 networks:
93 - gerritnet
94 volumes:
95 - ./logs/gerrit/:/var/gerrit/logs/:rw
96 - ./gerrit/etc/:/var/gerrit/etc/:rw
97 - ./gerrit/db/:/var/gerrit/db/:rw
98 - ./gerrit/git/:/var/gerrit/git/:rw
99 - ./gerrit/index/:/var/gerrit/index/:rw
100 - ./gerrit/cache/:/var/gerrit/cache/:rw
Nico Huber54073102023-06-25 11:36:59 +0000101 - ./gerrit/gerrit-oauth-provider.jar:/var/gerrit/plugins/gerrit-oauth-provider.jar:ro
Nico Huber804b41b2023-07-02 15:53:42 +0000102 mailserver:
103 image: ghcr.io/docker-mailserver/docker-mailserver:12
Nico Huber177e6102023-07-25 13:39:16 +0000104 secrets:
105 - source : seed
106 mode: 0400
Nico Huber804b41b2023-07-02 15:53:42 +0000107 #container_name: mailserver
108 # Provide the FQDN of your mail server here (Your DNS MX record should point to this value)
109 hostname: mail.${SA_PUBLIC_DOMAIN_NAME}
110 env_file: mail/mailserver.env
111 # More information about the mail-server ports:
112 # https://docker-mailserver.github.io/docker-mailserver/latest/config/security/understanding-the-ports/
113 # To avoid conflicts with yaml base-60 float, DO NOT remove the quotation marks.
114 ports:
115 - "25:25" # SMTP (explicit TLS => STARTTLS)
116 - "143:143" # IMAP4 (explicit TLS => STARTTLS)
117 - "465:465" # ESMTP (implicit TLS)
118 - "587:587" # ESMTP (explicit TLS => STARTTLS)
119 - "993:993" # IMAP4 (implicit TLS)
Nico Huberb650ed42023-07-20 17:08:54 +0000120 networks:
121 - gerritnet
Nico Huberf4fbab52023-07-25 10:57:08 +0000122 - kcnet
Nico Huber804b41b2023-07-02 15:53:42 +0000123 volumes:
124 - ./logs/mail-supervisor/:/var/log/supervisor/:rw
125 - ./logs/mail/:/var/log/mail/:rw
Nico Huber49781a72023-07-02 16:29:22 +0000126 - ./certs/:/etc/letsencrypt/:ro
Nico Huber804b41b2023-07-02 15:53:42 +0000127 - ./mail/data/:/var/mail/:rw
128 - ./mail/state/:/var/mail-state/:rw
129 - ./mail/config/:/tmp/docker-mailserver/:rw
Nico Huber22aecea2023-07-19 01:39:58 +0000130 - ./mail/rspamd-override.d/:/etc/rspamd/override.d/:rw
Nico Huber804b41b2023-07-02 15:53:42 +0000131 - /etc/localtime:/etc/localtime:ro
132 restart: always
133 stop_grace_period: 1m
134 # Uncomment if using `ENABLE_FAIL2BAN=1`:
135 # cap_add:
136 # - NET_ADMIN
137 healthcheck:
138 test: "ss --listening --tcp | grep -P 'LISTEN.+:smtp' || exit 1"
139 timeout: 3s
140 retries: 0
Nico Huber8cd50ee2023-06-24 15:35:16 +0000141networks:
Nico Hubera1a296f2023-06-25 10:07:07 +0000142 gerritnet:
143 driver: bridge
Nico Huber4bc2bdd2023-07-01 22:33:36 +0000144 ipam:
145 config:
146 - subnet: 10.12.14.24/29
Nico Huber5d7a1cb2023-07-23 19:36:14 +0000147 dbnet:
148 driver: bridge
149 ipam:
150 config:
151 - subnet: 10.12.14.40/29
Nico Huberf4fbab52023-07-25 10:57:08 +0000152 kcnet:
153 driver: bridge
154 ipam:
155 config:
156 - subnet: 10.12.14.48/29
Nico Huber8d9f45e2023-07-25 13:22:32 +0000157secrets:
158 seed:
159 file: .seed