blob: 94eb7245912577c8f6de293f894d07ec03fe468b [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/
Nico Huber472cfc72023-07-25 14:20:55 +000031 secrets:
32 - seed
Nico Huber5d7a1cb2023-07-23 19:36:14 +000033 networks:
34 - dbnet
35 volumes:
36 - ./postgres/postgres.conf:/etc/postgresql/postgresql.conf:ro
37 - ./postgres/init.sh:/docker-entrypoint-initdb.d/init.sh:ro
38 - ./postgres/data/:/var/lib/postgresql/data/:rw
Nico Huberf4fbab52023-07-25 10:57:08 +000039 keycloak:
40 build:
41 context: ./keycloak/docker/
42 args:
43 - KC_DB=postgres
Nico Huber472cfc72023-07-25 14:20:55 +000044 secrets:
45 - source : seed
46 mode: 0400
Nico Huberf4fbab52023-07-25 10:57:08 +000047 networks:
48 - kcnet
49 - dbnet
50 env_file: environment
51 environment:
52 - KC_PROXY=edge
53 - KC_HOSTNAME_DEBUG=true
54 - KC_HOSTNAME_STRICT=true
55 - KC_HOSTNAME_STRICT_BACKCHANNEL=true
56 - KC_HOSTNAME_URL=https://id.${SA_PUBLIC_DOMAIN_NAME}/
57 - KC_HOSTNAME_ADMIN_URL=https://id.${SA_PUBLIC_DOMAIN_NAME}/
58 - KC_DB_USERNAME=keycloak
59 - KC_DB_URL_HOST=postgres
60 - KC_DB_URL=jdbc:postgresql://postgres/keycloak
61 - KC_DB_POOL_MAX_SIZE=16
62 - KEYCLOAK_ADMIN=deusarcadia
63 - KEYCLOAK_ADMIN_PASSWORD=arcanumhomini
Nico Huber7f8dc5b2023-07-25 16:48:01 +000064 keycloak-init-realm:
65 depends_on:
66 - keycloak
67 build:
68 context: ./keycloak/init/
69 env_file:
70 - keycloak/environment
71 - environment
72 environment:
73 - KEYCLOAK_ADMIN=deusarcadia
74 - KEYCLOAK_ADMIN_PASSWORD=arcanumhomini
75 networks:
76 - kcnet
77 secrets:
78 - seed
Nico Huber8cd50ee2023-06-24 15:35:16 +000079 simpleid:
80 build:
81 context: .
82 dockerfile: simpleid/Dockerfile
Nico Huberd6528722023-07-01 14:38:39 +000083 env_file: environment
Nico Huber8cd50ee2023-06-24 15:35:16 +000084 networks:
85 - simpleidnet
86 volumes:
87 - ./simpleid/cache/:/var/cache/simpleid/:rw
Nico Huberd6528722023-07-01 14:38:39 +000088 - ./simpleid/identities/:/var/db/simpleid-templates/:ro
Nico Huber8cd50ee2023-06-24 15:35:16 +000089 - ./simpleid/store/:/var/lib/simpleid/:rw
Nico Huberd6528722023-07-01 14:38:39 +000090 - ./simpleid/www/:/var/www/simpleid/:ro
Nico Huber8cd50ee2023-06-24 15:35:16 +000091 - ./logs/simpleid/:/var/log/:rw
Nico Hubera1a296f2023-06-25 10:07:07 +000092 gerrit:
93 build:
94 context: .
95 dockerfile: gerrit/Dockerfile
Nico Huber177e6102023-07-25 13:39:16 +000096 secrets:
97 - source : seed
98 mode: 0400
Nico Huberb650ed42023-07-20 17:08:54 +000099 hostname: review.${SA_PUBLIC_DOMAIN_NAME}
100 env_file:
101 - gerrit/environment
102 - environment
Nico Hubera1a296f2023-06-25 10:07:07 +0000103 environment:
Nico Huberb650ed42023-07-20 17:08:54 +0000104 - GERRIT_USER_EMAIL=gerrit@${SA_PUBLIC_DOMAIN_NAME}
Nico Hubera1a296f2023-06-25 10:07:07 +0000105 - HTTPD_LISTEN_URL=proxy-https://*:8080/
Nico Huber3c7f1c02023-07-20 17:18:51 +0000106 ports:
107 - "29418:29418"
Nico Hubera1a296f2023-06-25 10:07:07 +0000108 networks:
109 - gerritnet
110 volumes:
111 - ./logs/gerrit/:/var/gerrit/logs/:rw
112 - ./gerrit/etc/:/var/gerrit/etc/:rw
113 - ./gerrit/db/:/var/gerrit/db/:rw
114 - ./gerrit/git/:/var/gerrit/git/:rw
115 - ./gerrit/index/:/var/gerrit/index/:rw
116 - ./gerrit/cache/:/var/gerrit/cache/:rw
Nico Huber54073102023-06-25 11:36:59 +0000117 - ./gerrit/gerrit-oauth-provider.jar:/var/gerrit/plugins/gerrit-oauth-provider.jar:ro
Nico Huber804b41b2023-07-02 15:53:42 +0000118 mailserver:
119 image: ghcr.io/docker-mailserver/docker-mailserver:12
Nico Huber177e6102023-07-25 13:39:16 +0000120 secrets:
121 - source : seed
122 mode: 0400
Nico Huber804b41b2023-07-02 15:53:42 +0000123 #container_name: mailserver
124 # Provide the FQDN of your mail server here (Your DNS MX record should point to this value)
125 hostname: mail.${SA_PUBLIC_DOMAIN_NAME}
126 env_file: mail/mailserver.env
127 # More information about the mail-server ports:
128 # https://docker-mailserver.github.io/docker-mailserver/latest/config/security/understanding-the-ports/
129 # To avoid conflicts with yaml base-60 float, DO NOT remove the quotation marks.
130 ports:
131 - "25:25" # SMTP (explicit TLS => STARTTLS)
132 - "143:143" # IMAP4 (explicit TLS => STARTTLS)
133 - "465:465" # ESMTP (implicit TLS)
134 - "587:587" # ESMTP (explicit TLS => STARTTLS)
135 - "993:993" # IMAP4 (implicit TLS)
Nico Huberb650ed42023-07-20 17:08:54 +0000136 networks:
137 - gerritnet
Nico Huberf4fbab52023-07-25 10:57:08 +0000138 - kcnet
Nico Huber804b41b2023-07-02 15:53:42 +0000139 volumes:
140 - ./logs/mail-supervisor/:/var/log/supervisor/:rw
141 - ./logs/mail/:/var/log/mail/:rw
Nico Huber49781a72023-07-02 16:29:22 +0000142 - ./certs/:/etc/letsencrypt/:ro
Nico Huber804b41b2023-07-02 15:53:42 +0000143 - ./mail/data/:/var/mail/:rw
144 - ./mail/state/:/var/mail-state/:rw
145 - ./mail/config/:/tmp/docker-mailserver/:rw
Nico Huber22aecea2023-07-19 01:39:58 +0000146 - ./mail/rspamd-override.d/:/etc/rspamd/override.d/:rw
Nico Huber804b41b2023-07-02 15:53:42 +0000147 - /etc/localtime:/etc/localtime:ro
148 restart: always
149 stop_grace_period: 1m
150 # Uncomment if using `ENABLE_FAIL2BAN=1`:
151 # cap_add:
152 # - NET_ADMIN
153 healthcheck:
154 test: "ss --listening --tcp | grep -P 'LISTEN.+:smtp' || exit 1"
155 timeout: 3s
156 retries: 0
Nico Huber8cd50ee2023-06-24 15:35:16 +0000157networks:
158 simpleidnet:
159 driver: bridge
Nico Huber4bc2bdd2023-07-01 22:33:36 +0000160 ipam:
161 config:
162 - subnet: 10.12.14.16/29
Nico Hubera1a296f2023-06-25 10:07:07 +0000163 gerritnet:
164 driver: bridge
Nico Huber4bc2bdd2023-07-01 22:33:36 +0000165 ipam:
166 config:
167 - subnet: 10.12.14.24/29
Nico Huber5d7a1cb2023-07-23 19:36:14 +0000168 dbnet:
169 driver: bridge
170 ipam:
171 config:
172 - subnet: 10.12.14.40/29
Nico Huberf4fbab52023-07-25 10:57:08 +0000173 kcnet:
174 driver: bridge
175 ipam:
176 config:
177 - subnet: 10.12.14.48/29
Nico Huber8d9f45e2023-07-25 13:22:32 +0000178secrets:
179 seed:
180 file: .seed