nuosso/docker-compose.yml

132 lines
3.3 KiB
YAML
Raw Normal View History

2023-07-18 09:59:57 +02:00
version: '3'
services:
2023-07-20 11:56:10 +02:00
# Service redis
redis-master:
image: redis:6-alpine
volumes:
- "./.data:/data"
ports:
- "6379:6379"
redis-slave:
image: redis:6-alpine
command: redis-server --slaveof redis-master 6379
links:
- redis-master
volumes:
- "./.data:/data"
redis-sentinel:
build:
context: ./misc/images/redis-sentinel
links:
- redis-master
# Service postgres
postgres:
image: postgres:13-alpine
hostname: postgres
environment:
POSTGRES_MULTIPLE_DATABASES: app,hydra
POSTGRES_PASSWORD: changeme
POSTGRES_USER: symfony
ports:
- 5432:5432
volumes:
- db-data:/var/lib/postgresql/data:rw
- ./misc/images/postgres:/docker-entrypoint-initdb.d
# Service app
app:
build:
context: .
dockerfile: ./misc/images/app/app-docker/Dockerfile
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: PROD
# Service hydra
hydra:
image: cadoles/hydra-v1
hostname: hydra
volumes:
- ./misc/images/hydra/clients.d:/etc/hydra/clients.d
ports:
- 7080:4444
- 4445:4445
links:
- postgres
depends_on:
- postgres
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:8080/hydra/consent
HYDRA_URLS_LOGIN: http://127.0.0.1:8080/hydra/loginsql
HYDRA_URLS_LOGOUT: http://127.0.0.1:8080/hydra/logoutsql
HYDRA_URLS_ERROR: https://127.0.0.1:8080
HYDRA_DSN: postgres://symfony:changeme@postgres:5432/hydra
HYDRA_ALLOW_INSECURE: "yes"
HYDRA_LEVEL: debug
# Service Openldap
openldap:
image: osixia/openldap:1.5.0
environment:
LDAP_LOG_LEVEL: "256"
LDAP_ORGANISATION: "nuo"
LDAP_DOMAIN: "nuo.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 phpldapadmin
phpldapadmin:
image: osixia/phpldapadmin:latest
environment:
PHPLDAPADMIN_LDAP_HOSTS: "openldap"
PHPLDAPADMIN_HTTPS: "false"
ports:
- "6080:80"
depends_on:
- openldap
# Service adminer
adminer:
image: adminer
restart: always
ports:
- 6081:8080
2023-07-18 09:59:57 +02:00
volumes:
2023-07-20 11:56:10 +02:00
db-data: