mirror of
https://github.com/creyD/apilog.git
synced 2026-04-12 11:20:29 +02:00
37 lines
780 B
YAML
37 lines
780 B
YAML
---
|
|
x-restart-policy: &restart_policy
|
|
restart: unless-stopped
|
|
|
|
services:
|
|
apilog_worker:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
<<: *restart_policy
|
|
container_name: api_worker
|
|
environment:
|
|
- POSTGRES_HOST=apilog_db
|
|
- POSTGRES_PORT=5432
|
|
- POSTGRES_USER=root
|
|
- POSTGRES_PASSWORD=password
|
|
- POSTGRES_DB=apilog
|
|
depends_on:
|
|
apilog_db:
|
|
condition: service_healthy
|
|
|
|
apilog_db:
|
|
image: postgres
|
|
environment:
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: root
|
|
POSTGRES_DB: fastapi
|
|
<<: *restart_policy
|
|
container_name: apilog_db
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U root"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
ports:
|
|
- "5432:5432"
|