27 lines
602 B
YAML
27 lines
602 B
YAML
services:
|
|
postgres:
|
|
image: postgres:15
|
|
environment:
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: postgres
|
|
ports:
|
|
- "5432:5432"
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
pg-instance-handler:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
environment:
|
|
DATABASE_URL: postgres://postgres:postgres@postgres:5432/postgres
|
|
ports:
|
|
- "8080:8080"
|
|
volumes:
|
|
- ./database.txt:/database.txt:ro |