102 lines
2.3 KiB
YAML
102 lines
2.3 KiB
YAML
services:
|
|
nginx:
|
|
image: nginx:latest
|
|
container_name: nginx-proxy
|
|
ports:
|
|
- "8080:8080"
|
|
volumes:
|
|
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
|
|
- ./keys:/app/keys
|
|
depends_on:
|
|
- identity-manager
|
|
- account-manager
|
|
- policy-manager
|
|
- role-manager
|
|
|
|
identity-manager:
|
|
build:
|
|
context: .
|
|
dockerfile: ./identity-manager/Dockerfile
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
environment:
|
|
- POSTGRES_HOSTNAME=db
|
|
- POSTGRES_PORT=5432
|
|
- POSTGRES_USER=user
|
|
- POSTGRES_PASSWORD=password
|
|
- POSTGRES_DB=pcloud_db
|
|
volumes:
|
|
- ./keys:/app/keys:ro
|
|
|
|
account-manager:
|
|
build:
|
|
context: .
|
|
dockerfile: account-manager/Dockerfile
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
environment:
|
|
- POSTGRES_HOSTNAME=db
|
|
- POSTGRES_PORT=5432
|
|
- POSTGRES_USER=user
|
|
- POSTGRES_PASSWORD=password
|
|
- POSTGRES_DB=pcloud_db
|
|
volumes:
|
|
- ./keys:/app/keys:ro
|
|
|
|
policy-manager:
|
|
build:
|
|
context: .
|
|
dockerfile: policy-manager/Dockerfile
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
environment:
|
|
- POSTGRES_HOSTNAME=db
|
|
- POSTGRES_PORT=5432
|
|
- POSTGRES_USER=user
|
|
- POSTGRES_PASSWORD=password
|
|
- POSTGRES_DB=pcloud_db
|
|
volumes:
|
|
- ./keys:/app/keys:ro
|
|
|
|
role-manager:
|
|
build:
|
|
context: .
|
|
dockerfile: ./role-manager/Dockerfile
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
environment:
|
|
- POSTGRES_HOSTNAME=db
|
|
- POSTGRES_PORT=5432
|
|
- POSTGRES_USER=user
|
|
- POSTGRES_PASSWORD=password
|
|
- POSTGRES_DB=pcloud_db
|
|
volumes:
|
|
- ./keys:/app/keys:ro
|
|
|
|
# The PostgreSQL Database
|
|
db:
|
|
image: postgres:15-alpine
|
|
restart: always
|
|
ports:
|
|
- "5432:5432"
|
|
environment:
|
|
- POSTGRES_USER=user
|
|
- POSTGRES_PASSWORD=password
|
|
- POSTGRES_DB=pcloud_db
|
|
volumes:
|
|
- db_data:/var/lib/postgresql/data
|
|
# - ./db/db_data:/var/lib/postgresql/data
|
|
- ./db/initsql:/docker-entrypoint-initdb.d # Maps the whole folder!
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U user -d pcloud_db"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 10
|
|
|
|
# The top-level volumes section must define the volume name
|
|
volumes:
|
|
db_data: |