nuosso/docker-compose.yml

132 lines
3.3 KiB
YAML
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

version: '3'
services:
# Service redis
redis-master:
image: redis:6-alpine
volumes:
- "./.data:/data:rw"
ports:
- "6379:6379"
redis-slave:
image: redis:6-alpine
command: redis-server --slaveof redis-master 6379
links:
- redis-master
volumes:
- "./.data:/data:rw"
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: dev
# 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/loginldap
HYDRA_URLS_LOGOUT: http://127.0.0.1:8080/hydra/logoutldap
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
volumes:
db-data: