nineskeletor/docker-compose.yml

306 lines
7.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
2023-07-23 15:46:26 +02:00
# 5432 = postgres
2022-08-26 15:13:22 +02:00
# 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:
2023-07-23 15:46:26 +02:00
# Service redis
redis-master:
image: redis:6-alpine
container_name: nineskeletor-redismaster
volumes:
- "./.data:/data:rw"
2022-08-22 16:24:02 +02:00
ports:
2023-07-23 15:46:26 +02:00
- "6379:6379"
redis-slave:
image: redis:6-alpine
container_name: nineskeletor-redisslave
command: redis-server --slaveof redis-master 6379
links:
- redis-master
2022-08-22 16:24:02 +02:00
volumes:
2023-07-23 15:46:26 +02:00
- "./.data:/data:rw"
2022-08-22 16:24:02 +02:00
2023-07-23 15:46:26 +02:00
redis-sentinel:
container_name: nineskeletor-redissentinel
build:
context: ./misc/images/redis-sentinel
links:
- redis-master
# Service postgres pour le stockage de la bdd applicative
postgres:
2022-08-26 15:13:22 +02:00
image: postgres:13-alpine
2023-07-23 15:46:26 +02:00
container_name: nineskeletor-postgres
hostname: nineskeletor-postgres
2022-07-21 16:15:47 +02:00
environment:
2022-08-26 15:13:22 +02:00
POSTGRES_MULTIPLE_DATABASES: app,hydra
2023-07-23 15:46:26 +02:00
POSTGRES_PASSWORD: changeme
2022-08-26 15:13:22 +02:00
POSTGRES_USER: symfony
2022-07-21 16:15:47 +02:00
ports:
- 5432:5432
volumes:
2023-07-23 15:46:26 +02:00
- db-data:/var/lib/postgres/data:rw
- ./misc/images/postgres:/docker-entrypoint-initdb.d
# Service app
app:
build:
context: .
dockerfile: ./misc/images/app/app-docker/Dockerfile
2023-09-13 17:21:06 +02:00
container_name: nineskeletor-app
image: reg.cadoles.com/envole/nineskeletor
2023-07-23 15:46:26 +02:00
ports:
- ${APP_HTTP_PORT:-8080}:8080
links:
- postgres
- hydra
- redis-sentinel
depends_on:
- postgres
- hydra
volumes:
- ./src:/app/src:delegated
- ./public:/app/public:delegated
- ./templates:/app/templates:delegated
- ./translations:/app/translations:delegated
- ./tests:/app/tests:delegated
- ./config:/app/config:delegated
- ./.env:/app/.env:delegated
environment:
PHP_FPM_MEMORY_LIMIT: 128m
APP_ENV: dev
2023-09-13 17:21:06 +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:
2023-09-13 17:44:04 +02:00
- "8081:80"
2022-07-21 16:15:47 +02:00
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: |
2023-09-14 22:44:53 +02:00
cors_origins "http://localhost:8080"
2023-09-13 17:44:04 +02:00
anonymous
2022-07-21 16:15:47 +02:00
# Comment the following line to disable the development mode
2023-09-13 17:44:04 +02:00
#command: /usr/bin/caddy run -config /etc/caddy/Caddyfile.dev
2022-07-21 16:15:47 +02:00
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:
2023-09-14 22:44:53 +02:00
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
2022-08-24 14:40:10 +02:00
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:
2023-09-14 22:44:53 +02:00
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
2022-08-24 14:40:10 +02:00
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:
2023-09-14 22:44:53 +02:00
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
2022-08-24 14:40:10 +02:00
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:
2023-09-14 22:44:53 +02:00
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
2022-08-24 14:40:10 +02:00
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:
2023-07-23 15:46:26 +02:00
- ./misc/images/minio/nginx.conf:/etc/nginx/nginx.conf:ro
2022-08-24 14:40:10 +02:00
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:
2023-07-23 15:46:26 +02:00
- ./misc/images/hydra/clients.d:/etc/hydra/clients.d
2022-08-26 15:13:22 +02:00
ports:
- 7080:4444
2022-08-27 18:24:56 +02:00
- 4445:4445
2022-08-26 15:13:22 +02:00
links:
2023-07-23 15:46:26 +02:00
- postgres
2022-08-26 15:13:22 +02:00
depends_on:
2023-07-23 15:46:26 +02:00
- postgres
2022-08-26 15:13:22 +02:00
restart: on-failure
environment:
LOG_LEAK_SENSITIVE_VALUES: "true"
2023-09-14 22:44:53 +02:00
HYDRA_URLS_SELF_ISSUER: http://localhost:7080
HYDRA_URLS_CONSENT: http://localhost:7081/consent
HYDRA_URLS_LOGIN: http://localhost:7081/login
HYDRA_URLS_LOGOUT: http://localhost:7081/logout
2023-07-23 15:46:26 +02:00
HYDRA_DSN: postgres://symfony:changeme@postgres:5432/hydra
2022-08-26 15:13:22 +02:00
#HYDRA_WAIT4X_DATABASE_TYPE: postgres
2023-07-23 15:46:26 +02:00
#HYDRA_WAIT4X_DATABASE_DSN: postgres://symfony:changeme@postgres:5432/hydra
2022-08-26 15:13:22 +02:00
HYDRA_ALLOW_INSECURE: "yes"
HYDRA_LEVEL: debug
hydra-dispatcher:
build:
2023-07-23 15:46:26 +02:00
context: ./misc/images/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
2023-09-14 22:44:53 +02:00
- BASE_URL=http://localhost:7081
2022-08-26 15:13:22 +02:00
- COOKIE_PATH=/
- DEFAULT_LOCALE=fr
- APP_LOCALES=fr,en
volumes:
2023-07-23 15:46:26 +02:00
- ./misc/images/hydra-dispatcher/hydra:/var/www/config/hydra:ro
- ./misc/images/hydra-dispatcher/templates:/var/www/templates
- ./misc/images/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: