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: |
| 5 | context: . |
| 6 | dockerfile: nginx/Dockerfile |
Nico Huber | aa15aee | 2023-07-01 22:35:45 +0000 | [diff] [blame] | 7 | 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 Huber | d652872 | 2023-07-01 14:38:39 +0000 | [diff] [blame] | 12 | env_file: environment |
Nico Huber | 8cd50ee | 2023-06-24 15:35:16 +0000 | [diff] [blame] | 13 | ports: |
| 14 | - "80:80" |
Nico Huber | 38c14da | 2023-06-24 16:59:28 +0000 | [diff] [blame] | 15 | - "443:443" |
Nico Huber | 8cd50ee | 2023-06-24 15:35:16 +0000 | [diff] [blame] | 16 | networks: |
Nico Huber | f4fbab5 | 2023-07-25 10:57:08 +0000 | [diff] [blame^] | 17 | - kcnet |
Nico Huber | 8cd50ee | 2023-06-24 15:35:16 +0000 | [diff] [blame] | 18 | - simpleidnet |
Nico Huber | a1a296f | 2023-06-25 10:07:07 +0000 | [diff] [blame] | 19 | - gerritnet |
Nico Huber | 8cd50ee | 2023-06-24 15:35:16 +0000 | [diff] [blame] | 20 | volumes: |
Nico Huber | 15edd77 | 2023-07-01 18:16:50 +0000 | [diff] [blame] | 21 | - ./certbot/www/:/var/www/certbot/:ro |
Nico Huber | d652872 | 2023-07-01 14:38:39 +0000 | [diff] [blame] | 22 | - ./simpleid/identities/:/var/db/simpleid-templates/:ro |
| 23 | - ./simpleid/www/:/var/www/simpleid/:ro |
Nico Huber | 15edd77 | 2023-07-01 18:16:50 +0000 | [diff] [blame] | 24 | - ./certs/:/etc/nginx/certs/:rw |
Nico Huber | d652872 | 2023-07-01 14:38:39 +0000 | [diff] [blame] | 25 | - ./nginx/sa.conf:/etc/nginx/conf.d/sa.conf.template:ro |
Nico Huber | 8cd50ee | 2023-06-24 15:35:16 +0000 | [diff] [blame] | 26 | - ./nginx/empty.conf:/etc/nginx/conf.d/default.conf:ro |
| 27 | - ./logs/nginx:/var/log/nginx/:rw |
Nico Huber | 5d7a1cb | 2023-07-23 19:36:14 +0000 | [diff] [blame] | 28 | 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 Huber | f4fbab5 | 2023-07-25 10:57:08 +0000 | [diff] [blame^] | 38 | 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 Huber | 8cd50ee | 2023-06-24 15:35:16 +0000 | [diff] [blame] | 62 | simpleid: |
| 63 | build: |
| 64 | context: . |
| 65 | dockerfile: simpleid/Dockerfile |
Nico Huber | d652872 | 2023-07-01 14:38:39 +0000 | [diff] [blame] | 66 | env_file: environment |
Nico Huber | 8cd50ee | 2023-06-24 15:35:16 +0000 | [diff] [blame] | 67 | networks: |
| 68 | - simpleidnet |
| 69 | volumes: |
| 70 | - ./simpleid/cache/:/var/cache/simpleid/:rw |
Nico Huber | d652872 | 2023-07-01 14:38:39 +0000 | [diff] [blame] | 71 | - ./simpleid/identities/:/var/db/simpleid-templates/:ro |
Nico Huber | 8cd50ee | 2023-06-24 15:35:16 +0000 | [diff] [blame] | 72 | - ./simpleid/store/:/var/lib/simpleid/:rw |
Nico Huber | d652872 | 2023-07-01 14:38:39 +0000 | [diff] [blame] | 73 | - ./simpleid/www/:/var/www/simpleid/:ro |
Nico Huber | 8cd50ee | 2023-06-24 15:35:16 +0000 | [diff] [blame] | 74 | - ./logs/simpleid/:/var/log/:rw |
Nico Huber | a1a296f | 2023-06-25 10:07:07 +0000 | [diff] [blame] | 75 | gerrit: |
| 76 | build: |
| 77 | context: . |
| 78 | dockerfile: gerrit/Dockerfile |
Nico Huber | b650ed4 | 2023-07-20 17:08:54 +0000 | [diff] [blame] | 79 | hostname: review.${SA_PUBLIC_DOMAIN_NAME} |
| 80 | env_file: |
| 81 | - gerrit/environment |
| 82 | - environment |
Nico Huber | a1a296f | 2023-06-25 10:07:07 +0000 | [diff] [blame] | 83 | environment: |
Nico Huber | b650ed4 | 2023-07-20 17:08:54 +0000 | [diff] [blame] | 84 | - GERRIT_USER_EMAIL=gerrit@${SA_PUBLIC_DOMAIN_NAME} |
Nico Huber | a1a296f | 2023-06-25 10:07:07 +0000 | [diff] [blame] | 85 | - HTTPD_LISTEN_URL=proxy-https://*:8080/ |
Nico Huber | 3c7f1c0 | 2023-07-20 17:18:51 +0000 | [diff] [blame] | 86 | ports: |
| 87 | - "29418:29418" |
Nico Huber | a1a296f | 2023-06-25 10:07:07 +0000 | [diff] [blame] | 88 | networks: |
| 89 | - gerritnet |
| 90 | volumes: |
| 91 | - ./logs/gerrit/:/var/gerrit/logs/:rw |
Nico Huber | b650ed4 | 2023-07-20 17:08:54 +0000 | [diff] [blame] | 92 | - ./mail/passwd/gerrit/:/var/gerrit/passwd/:rw |
Nico Huber | a1a296f | 2023-06-25 10:07:07 +0000 | [diff] [blame] | 93 | - ./gerrit/etc/:/var/gerrit/etc/:rw |
| 94 | - ./gerrit/db/:/var/gerrit/db/:rw |
| 95 | - ./gerrit/git/:/var/gerrit/git/:rw |
| 96 | - ./gerrit/index/:/var/gerrit/index/:rw |
| 97 | - ./gerrit/cache/:/var/gerrit/cache/:rw |
Nico Huber | 5407310 | 2023-06-25 11:36:59 +0000 | [diff] [blame] | 98 | - ./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] | 99 | mailserver: |
| 100 | image: ghcr.io/docker-mailserver/docker-mailserver:12 |
| 101 | #container_name: mailserver |
| 102 | # Provide the FQDN of your mail server here (Your DNS MX record should point to this value) |
| 103 | hostname: mail.${SA_PUBLIC_DOMAIN_NAME} |
| 104 | env_file: mail/mailserver.env |
| 105 | # More information about the mail-server ports: |
| 106 | # https://docker-mailserver.github.io/docker-mailserver/latest/config/security/understanding-the-ports/ |
| 107 | # To avoid conflicts with yaml base-60 float, DO NOT remove the quotation marks. |
| 108 | ports: |
| 109 | - "25:25" # SMTP (explicit TLS => STARTTLS) |
| 110 | - "143:143" # IMAP4 (explicit TLS => STARTTLS) |
| 111 | - "465:465" # ESMTP (implicit TLS) |
| 112 | - "587:587" # ESMTP (explicit TLS => STARTTLS) |
| 113 | - "993:993" # IMAP4 (implicit TLS) |
Nico Huber | b650ed4 | 2023-07-20 17:08:54 +0000 | [diff] [blame] | 114 | networks: |
| 115 | - gerritnet |
Nico Huber | f4fbab5 | 2023-07-25 10:57:08 +0000 | [diff] [blame^] | 116 | - kcnet |
Nico Huber | 804b41b | 2023-07-02 15:53:42 +0000 | [diff] [blame] | 117 | volumes: |
| 118 | - ./logs/mail-supervisor/:/var/log/supervisor/:rw |
| 119 | - ./logs/mail/:/var/log/mail/:rw |
Nico Huber | 49781a7 | 2023-07-02 16:29:22 +0000 | [diff] [blame] | 120 | - ./certs/:/etc/letsencrypt/:ro |
Nico Huber | b650ed4 | 2023-07-20 17:08:54 +0000 | [diff] [blame] | 121 | - ./mail/passwd/:/tmp/passwd/:ro |
Nico Huber | 804b41b | 2023-07-02 15:53:42 +0000 | [diff] [blame] | 122 | - ./mail/data/:/var/mail/:rw |
| 123 | - ./mail/state/:/var/mail-state/:rw |
| 124 | - ./mail/config/:/tmp/docker-mailserver/:rw |
Nico Huber | 22aecea | 2023-07-19 01:39:58 +0000 | [diff] [blame] | 125 | - ./mail/rspamd-override.d/:/etc/rspamd/override.d/:rw |
Nico Huber | 804b41b | 2023-07-02 15:53:42 +0000 | [diff] [blame] | 126 | - /etc/localtime:/etc/localtime:ro |
| 127 | restart: always |
| 128 | stop_grace_period: 1m |
| 129 | # Uncomment if using `ENABLE_FAIL2BAN=1`: |
| 130 | # cap_add: |
| 131 | # - NET_ADMIN |
| 132 | healthcheck: |
| 133 | test: "ss --listening --tcp | grep -P 'LISTEN.+:smtp' || exit 1" |
| 134 | timeout: 3s |
| 135 | retries: 0 |
Nico Huber | 8cd50ee | 2023-06-24 15:35:16 +0000 | [diff] [blame] | 136 | networks: |
| 137 | simpleidnet: |
| 138 | driver: bridge |
Nico Huber | 4bc2bdd | 2023-07-01 22:33:36 +0000 | [diff] [blame] | 139 | ipam: |
| 140 | config: |
| 141 | - subnet: 10.12.14.16/29 |
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 |