Nico Huber | 8cd50ee | 2023-06-24 15:35:16 +0000 | [diff] [blame] | 1 | version: "3" |
| 2 | services: |
| 3 | nginx: |
Nico Huber | 38c14da | 2023-06-24 16:59:28 +0000 | [diff] [blame] | 4 | build: |
Nico Huber | ba887d0 | 2023-07-25 16:59:06 +0000 | [diff] [blame] | 5 | context: ./nginx/ |
Nico Huber | aa15aee | 2023-07-01 22:35:45 +0000 | [diff] [blame] | 6 | 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 Huber | d652872 | 2023-07-01 14:38:39 +0000 | [diff] [blame] | 11 | env_file: environment |
Nico Huber | 8cd50ee | 2023-06-24 15:35:16 +0000 | [diff] [blame] | 12 | ports: |
| 13 | - "80:80" |
Nico Huber | 38c14da | 2023-06-24 16:59:28 +0000 | [diff] [blame] | 14 | - "443:443" |
Nico Huber | 8cd50ee | 2023-06-24 15:35:16 +0000 | [diff] [blame] | 15 | networks: |
Nico Huber | f4fbab5 | 2023-07-25 10:57:08 +0000 | [diff] [blame] | 16 | - kcnet |
Nico Huber | a1a296f | 2023-06-25 10:07:07 +0000 | [diff] [blame] | 17 | - gerritnet |
Nico Huber | 8cd50ee | 2023-06-24 15:35:16 +0000 | [diff] [blame] | 18 | volumes: |
Nico Huber | 15edd77 | 2023-07-01 18:16:50 +0000 | [diff] [blame] | 19 | - ./certbot/www/:/var/www/certbot/:ro |
Nico Huber | 15edd77 | 2023-07-01 18:16:50 +0000 | [diff] [blame] | 20 | - ./certs/:/etc/nginx/certs/:rw |
Nico Huber | 2a12889 | 2023-07-25 17:19:42 +0000 | [diff] [blame] | 21 | - ./nginx/sa.conf:/etc/nginx/templates/default.conf.template:ro |
| 22 | - ./nginx/id.sa.conf:/etc/nginx/templates/id.sa.conf.template:ro |
| 23 | - ./nginx/review.sa.conf:/etc/nginx/templates/review.sa.conf.template:ro |
Nico Huber | 8cd50ee | 2023-06-24 15:35:16 +0000 | [diff] [blame] | 24 | - ./logs/nginx:/var/log/nginx/:rw |
Nico Huber | 5d7a1cb | 2023-07-23 19:36:14 +0000 | [diff] [blame] | 25 | postgres: |
| 26 | build: |
| 27 | context: ./postgres/docker/ |
Nico Huber | 472cfc7 | 2023-07-25 14:20:55 +0000 | [diff] [blame] | 28 | secrets: |
| 29 | - seed |
Nico Huber | 5d7a1cb | 2023-07-23 19:36:14 +0000 | [diff] [blame] | 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 |
Nico Huber | f4fbab5 | 2023-07-25 10:57:08 +0000 | [diff] [blame] | 36 | keycloak: |
| 37 | build: |
| 38 | context: ./keycloak/docker/ |
| 39 | args: |
| 40 | - KC_DB=postgres |
Nico Huber | 472cfc7 | 2023-07-25 14:20:55 +0000 | [diff] [blame] | 41 | secrets: |
| 42 | - source : seed |
| 43 | mode: 0400 |
Nico Huber | f4fbab5 | 2023-07-25 10:57:08 +0000 | [diff] [blame] | 44 | 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 Huber | 7f8dc5b | 2023-07-25 16:48:01 +0000 | [diff] [blame] | 61 | 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 Huber | a1a296f | 2023-06-25 10:07:07 +0000 | [diff] [blame] | 76 | gerrit: |
| 77 | build: |
| 78 | context: . |
| 79 | dockerfile: gerrit/Dockerfile |
Nico Huber | 177e610 | 2023-07-25 13:39:16 +0000 | [diff] [blame] | 80 | secrets: |
| 81 | - source : seed |
| 82 | mode: 0400 |
Nico Huber | b650ed4 | 2023-07-20 17:08:54 +0000 | [diff] [blame] | 83 | hostname: review.${SA_PUBLIC_DOMAIN_NAME} |
| 84 | env_file: |
| 85 | - gerrit/environment |
| 86 | - environment |
Nico Huber | a1a296f | 2023-06-25 10:07:07 +0000 | [diff] [blame] | 87 | environment: |
Nico Huber | b650ed4 | 2023-07-20 17:08:54 +0000 | [diff] [blame] | 88 | - GERRIT_USER_EMAIL=gerrit@${SA_PUBLIC_DOMAIN_NAME} |
Nico Huber | a1a296f | 2023-06-25 10:07:07 +0000 | [diff] [blame] | 89 | - HTTPD_LISTEN_URL=proxy-https://*:8080/ |
Nico Huber | 3c7f1c0 | 2023-07-20 17:18:51 +0000 | [diff] [blame] | 90 | ports: |
| 91 | - "29418:29418" |
Nico Huber | a1a296f | 2023-06-25 10:07:07 +0000 | [diff] [blame] | 92 | 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 Huber | 5407310 | 2023-06-25 11:36:59 +0000 | [diff] [blame] | 101 | - ./gerrit/gerrit-oauth-provider.jar:/var/gerrit/plugins/gerrit-oauth-provider.jar:ro |
Nico Huber | 804b41b | 2023-07-02 15:53:42 +0000 | [diff] [blame] | 102 | mailserver: |
| 103 | image: ghcr.io/docker-mailserver/docker-mailserver:12 |
Nico Huber | 177e610 | 2023-07-25 13:39:16 +0000 | [diff] [blame] | 104 | secrets: |
| 105 | - source : seed |
| 106 | mode: 0400 |
Nico Huber | 804b41b | 2023-07-02 15:53:42 +0000 | [diff] [blame] | 107 | #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 Huber | b650ed4 | 2023-07-20 17:08:54 +0000 | [diff] [blame] | 120 | networks: |
| 121 | - gerritnet |
Nico Huber | f4fbab5 | 2023-07-25 10:57:08 +0000 | [diff] [blame] | 122 | - kcnet |
Nico Huber | 804b41b | 2023-07-02 15:53:42 +0000 | [diff] [blame] | 123 | volumes: |
| 124 | - ./logs/mail-supervisor/:/var/log/supervisor/:rw |
| 125 | - ./logs/mail/:/var/log/mail/:rw |
Nico Huber | 49781a7 | 2023-07-02 16:29:22 +0000 | [diff] [blame] | 126 | - ./certs/:/etc/letsencrypt/:ro |
Nico Huber | 804b41b | 2023-07-02 15:53:42 +0000 | [diff] [blame] | 127 | - ./mail/data/:/var/mail/:rw |
| 128 | - ./mail/state/:/var/mail-state/:rw |
| 129 | - ./mail/config/:/tmp/docker-mailserver/:rw |
Nico Huber | 22aecea | 2023-07-19 01:39:58 +0000 | [diff] [blame] | 130 | - ./mail/rspamd-override.d/:/etc/rspamd/override.d/:rw |
Nico Huber | 804b41b | 2023-07-02 15:53:42 +0000 | [diff] [blame] | 131 | - /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 Huber | 8cd50ee | 2023-06-24 15:35:16 +0000 | [diff] [blame] | 141 | networks: |
Nico Huber | a1a296f | 2023-06-25 10:07:07 +0000 | [diff] [blame] | 142 | gerritnet: |
| 143 | driver: bridge |
Nico Huber | 4bc2bdd | 2023-07-01 22:33:36 +0000 | [diff] [blame] | 144 | ipam: |
| 145 | config: |
| 146 | - subnet: 10.12.14.24/29 |
Nico Huber | 5d7a1cb | 2023-07-23 19:36:14 +0000 | [diff] [blame] | 147 | dbnet: |
| 148 | driver: bridge |
| 149 | ipam: |
| 150 | config: |
| 151 | - subnet: 10.12.14.40/29 |
Nico Huber | f4fbab5 | 2023-07-25 10:57:08 +0000 | [diff] [blame] | 152 | kcnet: |
| 153 | driver: bridge |
| 154 | ipam: |
| 155 | config: |
| 156 | - subnet: 10.12.14.48/29 |
Nico Huber | 8d9f45e | 2023-07-25 13:22:32 +0000 | [diff] [blame] | 157 | secrets: |
| 158 | seed: |
| 159 | file: .seed |