36 lines
1.0 KiB
YAML
36 lines
1.0 KiB
YAML
services:
|
|
database:
|
|
image: postgres:latest
|
|
restart: unless-stopped
|
|
container_name: whitelist-database
|
|
environment:
|
|
POSTGRES_USER: "${APP__DATABASE__USERNAME:-postgres}"
|
|
POSTGRES_PASSWORD: "${APP__DATABASE__PASSWORD:-password}"
|
|
POSTGRES_DB: "${APP__DATABASE__NAME:-whitelist}"
|
|
ports:
|
|
- 5432:5432
|
|
volumes:
|
|
- database-data:/var/lib/postgresql/data
|
|
|
|
api:
|
|
build: .
|
|
container_name: "whitelist-api"
|
|
links:
|
|
- "database:db"
|
|
restart: unless-stopped
|
|
ports:
|
|
- 8000:8000
|
|
environment:
|
|
APP__APPLICATION__HOST: "0.0.0.0"
|
|
APP__APPLICATION__PORT: "8000"
|
|
APP_DATABASE_REQUIRE_SSL: true
|
|
APP__DATABASE__HOST: "db"
|
|
APP__DATABASE__PORT: "${APP__DATABASE__PORT:-5432}"
|
|
APP__DATABASE__USERNAME: "${APP__DATABASE__USERNAME:-postgres}"
|
|
APP__DATABASE__PASSWORD: "${APP__DATABASE__PASSWORD:-password}"
|
|
APP__DATABASE__NAME: "${APP__DATABASE__NAME:-whitelist}"
|
|
APP__DATABASE__REQUIRE__SSL: false
|
|
|
|
volumes:
|
|
database-data:
|