Orchestration initialization
This commit is contained in:
107
docker-compose.yml
Normal file
107
docker-compose.yml
Normal file
@@ -0,0 +1,107 @@
|
||||
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
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U user -d pcloud_db"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
|
||||
|
||||
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/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:
|
||||
Reference in New Issue
Block a user