30 lines
640 B
YAML
30 lines
640 B
YAML
services:
|
|
database:
|
|
image: postgres
|
|
restart: always
|
|
environment:
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: password
|
|
volumes:
|
|
- ./schema.sql:/docker-entrypoint-initdb.d/schema.sql
|
|
ports:
|
|
- 4321:5432
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U postgres -d haystack_db"]
|
|
interval: 10s
|
|
retries: 5
|
|
start_period: 5s
|
|
timeout: 5s
|
|
backend:
|
|
build: .
|
|
restart: always
|
|
env_file: .env.docker
|
|
ports:
|
|
- 3040:3040
|
|
volumes:
|
|
- ./.env.docker:/app/.env
|
|
depends_on:
|
|
database:
|
|
condition: service_healthy
|
|
restart: true
|