43 lines
1.1 KiB
YAML
43 lines
1.1 KiB
YAML
services:
|
|
db:
|
|
image: postgres:17
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_DB: ${POSTGRES_DB:-parrhesia}
|
|
POSTGRES_USER: ${POSTGRES_USER:-parrhesia}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-parrhesia}
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 12
|
|
volumes:
|
|
- postgres-data:/var/lib/postgresql/data
|
|
|
|
migrate:
|
|
image: ${PARRHESIA_IMAGE:-parrhesia:latest}
|
|
profiles: ["tools"]
|
|
restart: "no"
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
environment:
|
|
DATABASE_URL: ${DATABASE_URL:-ecto://parrhesia:parrhesia@db:5432/parrhesia}
|
|
POOL_SIZE: ${POOL_SIZE:-20}
|
|
command: ["eval", "Parrhesia.Release.migrate()"]
|
|
|
|
parrhesia:
|
|
image: ${PARRHESIA_IMAGE:-parrhesia:latest}
|
|
restart: unless-stopped
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
environment:
|
|
DATABASE_URL: ${DATABASE_URL:-ecto://parrhesia:parrhesia@db:5432/parrhesia}
|
|
POOL_SIZE: ${POOL_SIZE:-20}
|
|
ports:
|
|
- "${PARRHESIA_HOST_PORT:-4413}:4413"
|
|
|
|
volumes:
|
|
postgres-data:
|