nineskeletor/docker-compose.yml

263 lines
6.8 KiB
YAML
Raw Normal View History

2022-07-21 16:15:47 +02:00
version: '3'
2022-08-26 15:13:22 +02:00
# Port
# 6379 = redis
# 5432 = postgresql
# 80 = mercure
# 9000 = minio nginx
# 1025 = fake smtp
# 1080 = fake webmail
# 389 = fake ldap
# 636 = fake ldaps
# 6080 = tool phpldapadmin
# 6081 = tool adminer
2022-07-21 16:15:47 +02:00
services:
2022-08-26 15:13:22 +02:00
# Service redis pour le stockage des sessions
2022-08-22 16:24:02 +02:00
redis:
image: redis:4.0
2023-01-05 20:07:17 +01:00
container_name: nineskeletor-redis
2022-08-22 16:24:02 +02:00
ports:
- 6379:6379
environment:
- TZ=Europe/Paris
volumes:
- /etc/localtime:/etc/localtime:ro
2022-08-26 15:13:22 +02:00
# Service postgresql pour le stockage de la bdd applicative
postgresql:
image: postgres:13-alpine
2023-01-05 20:07:17 +01:00
container_name: nineskeletor-postgresql
hostname: nineskeletor-postgresql
2022-07-21 16:15:47 +02:00
environment:
2023-01-23 09:46:34 +01:00
POSTGRES_MULTIPLE_DATABASES: ninegate,hydra
2022-08-26 15:13:22 +02:00
POSTGRES_PASSWORD: ChangeMe
POSTGRES_USER: symfony
2022-07-21 16:15:47 +02:00
ports:
- 5432:5432
volumes:
- db-data:/var/lib/postgresql/data:rw
2022-08-26 15:13:22 +02:00
- ./containers/postgresql:/docker-entrypoint-initdb.d
2022-07-21 16:15:47 +02:00
2022-08-26 15:13:22 +02:00
# Service websocket
2022-07-21 16:15:47 +02:00
mercure:
image: dunglas/mercure
2023-01-05 20:07:17 +01:00
container_name: nineskeletor-mercure
2022-07-21 16:15:47 +02:00
restart: unless-stopped
ports:
- "80"
environment:
SERVER_NAME: ':80'
2022-08-27 18:24:56 +02:00
MERCURE_PUBLISHER_JWT_KEY: '!changeme!changeme!changeme!changeme!changeme!changeme!'
MERCURE_SUBSCRIBER_JWT_KEY: '!changeme!changeme!changeme!changeme!changeme!changeme!'
2022-07-21 16:15:47 +02:00
MERCURE_EXTRA_DIRECTIVES: |
2022-07-21 16:33:00 +02:00
cors_origins https://127.0.0.1:8000
2022-07-21 16:15:47 +02:00
# Comment the following line to disable the development mode
command: /usr/bin/caddy run -config /etc/caddy/Caddyfile.dev
volumes:
- mercure_data:/data
- mercure_config:/config
2022-08-26 15:13:22 +02:00
# Service de stockage Minio
2022-08-24 14:40:10 +02:00
minio1:
image: minio/minio:RELEASE.2021-01-16T02-19-44Z
2023-01-05 20:07:17 +01:00
container_name: nineskeletor-minio1
2022-08-24 14:40:10 +02:00
volumes:
- data1-1:/data1
- data1-2:/data2
expose:
- "9000"
environment:
MINIO_ROOT_USER: minio
MINIO_ROOT_PASSWORD: changeme
command: server http://minio{1...4}/data{1...2}
healthcheck:
test: ["CMD", "curl", "-f", "http://127.0.0.1:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
2022-08-26 15:13:22 +02:00
# Service de stockage Minio
2022-08-24 14:40:10 +02:00
minio2:
image: minio/minio:RELEASE.2021-01-16T02-19-44Z
2023-01-05 20:07:17 +01:00
container_name: nineskeletor-minio2
2022-08-24 14:40:10 +02:00
volumes:
- data2-1:/data1
- data2-2:/data2
expose:
- "9000"
environment:
MINIO_ROOT_USER: minio
MINIO_ROOT_PASSWORD: changeme
command: server http://minio{1...4}/data{1...2}
healthcheck:
test: ["CMD", "curl", "-f", "http://127.0.0.1:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
2022-08-26 15:13:22 +02:00
# Service de stockage Minio
2022-08-24 14:40:10 +02:00
minio3:
image: minio/minio:RELEASE.2021-01-16T02-19-44Z
2023-01-05 20:07:17 +01:00
container_name: nineskeletor-minio3
2022-08-24 14:40:10 +02:00
volumes:
- data3-1:/data1
- data3-2:/data2
expose:
- "9000"
environment:
MINIO_ROOT_USER: minio
MINIO_ROOT_PASSWORD: changeme
command: server http://minio{1...4}/data{1...2}
healthcheck:
test: ["CMD", "curl", "-f", "http://127.0.0.1:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
2022-08-26 15:13:22 +02:00
# Service de stockage Minio
2022-08-24 14:40:10 +02:00
minio4:
image: minio/minio:RELEASE.2021-01-16T02-19-44Z
2023-01-05 20:07:17 +01:00
container_name: nineskeletor-minio4
2022-08-24 14:40:10 +02:00
volumes:
- data4-1:/data1
- data4-2:/data2
expose:
- "9000"
environment:
MINIO_ROOT_USER: minio
MINIO_ROOT_PASSWORD: changeme
command: server http://minio{1...4}/data{1...2}
healthcheck:
test: ["CMD", "curl", "-f", "http://127.0.0.1:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
2022-08-26 15:13:22 +02:00
# Service nginx orchestrateur des minio
2022-08-24 14:40:10 +02:00
nginx:
image: nginx:1.19.2-alpine
2023-01-05 20:07:17 +01:00
container_name: nineskeletor-nginx
2022-08-24 14:40:10 +02:00
volumes:
- ./containers/minio/nginx.conf:/etc/nginx/nginx.conf:ro
ports:
- "9000:9000"
depends_on:
- minio1
- minio2
- minio3
- minio4
2022-08-26 15:13:22 +02:00
# Service hydra
hydra:
image: cadoles/hydra-v1
2023-01-05 20:07:17 +01:00
container_name: nineskeletor-hydra
2022-08-26 15:13:22 +02:00
volumes:
- ./containers/hydra/clients.d:/etc/hydra/clients.d
ports:
- 7080:4444
2022-08-27 18:24:56 +02:00
- 4445:4445
2022-08-26 15:13:22 +02:00
links:
- postgresql
depends_on:
- postgresql
restart: on-failure
environment:
LOG_LEAK_SENSITIVE_VALUES: "true"
HYDRA_URLS_SELF_ISSUER: http://127.0.0.1:7080
HYDRA_URLS_CONSENT: http://127.0.0.1:7081/consent
HYDRA_URLS_LOGIN: http://127.0.0.1:7081/login
HYDRA_URLS_LOGOUT: http://127.0.0.1:7081/logout
HYDRA_DSN: postgres://symfony:ChangeMe@postgresql:5432/hydra
#HYDRA_WAIT4X_DATABASE_TYPE: postgres
#HYDRA_WAIT4X_DATABASE_DSN: postgres://symfony:ChangeMe@postgresql:5432/hydra
HYDRA_ALLOW_INSECURE: "yes"
HYDRA_LEVEL: debug
hydra-dispatcher:
build:
context: ./containers/hydra-dispatcher
2023-01-05 20:07:17 +01:00
container_name: nineskeletor-hydra-dispatcher
2022-08-26 15:13:22 +02:00
links:
- hydra
ports:
- 7081:80
restart: on-failure
environment:
- APP_ENV=dev
- APP_DEBUG=yes
- HYDRA_BASE_URL=http://hydra:4444
- HYDRA_ADMIN_BASE_URL=http://hydra:4445
# url dispatcher
- BASE_URL=http://127.0.0.1:7081
- COOKIE_PATH=/
- DEFAULT_LOCALE=fr
- APP_LOCALES=fr,en
volumes:
- ./containers/hydra-dispatcher/hydra:/var/www/config/hydra:ro
2023-01-05 20:07:17 +01:00
- ./containers/hydra-dispatcher/templates:/var/www/templates
- ./containers/hydra-dispatcher/theme.css:/var/www/public/build/theme/theme.css
2022-08-26 15:13:22 +02:00
# Service fake smtp = optionnel
mailer:
image: schickling/mailcatcher
2023-01-05 20:07:17 +01:00
container_name: nineskeletor-mailer
2022-08-26 15:13:22 +02:00
ports:
- 1025:1025
- 1080:1080
# Service fake openldap = optionnel si nineskeletor a une synchronisation avec un annuaire
openldap:
image: osixia/openldap:1.5.0
2023-01-05 20:07:17 +01:00
container_name: nineskeletor-openldap
2022-08-26 15:13:22 +02:00
environment:
LDAP_LOG_LEVEL: "256"
LDAP_ORGANISATION: "nine"
LDAP_DOMAIN: "nine.fr"
LDAP_ADMIN_PASSWORD: "changeme"
LDAP_CONFIG_PASSWORD: "changeme"
LDAP_READONLY_USER: "true"
LDAP_READONLY_USER_USERNAME: "readonly"
LDAP_READONLY_USER_PASSWORD: "readonly"
LDAP_TLS: "false"
volumes:
- /var/lib/ldap
- /etc/ldap/slapd.d
- /container/service/slapd/assets/certs/
ports:
- "389:389"
- "636:636"
# Service tool phpldapadmin = optionnel dans le cas de la présence d'un fake openldap
phpldapadmin:
image: osixia/phpldapadmin:latest
2023-01-05 20:07:17 +01:00
container_name: nineskeletor-phpldapadmin
2022-08-26 15:13:22 +02:00
environment:
PHPLDAPADMIN_LDAP_HOSTS: "openldap"
PHPLDAPADMIN_HTTPS: "false"
ports:
- "6080:80"
depends_on:
- openldap
# Service tool adminer = optionnel
adminer:
image: adminer
2023-01-05 20:07:17 +01:00
container_name: nineskeletor-adminer
2022-08-26 15:13:22 +02:00
restart: always
ports:
- 6081:8080
2022-08-24 14:40:10 +02:00
2022-07-21 16:15:47 +02:00
volumes:
db-data:
mercure_data:
mercure_config:
2022-08-24 14:40:10 +02:00
data1-1:
data1-2:
data2-1:
data2-2:
data3-1:
data3-2:
data4-1:
data4-2: