Labour-Connect / backend /docker-compose.yml
Abhisingh-18's picture
Mirror of github.com/Abhisingh18/Labour-Connect
b24b684 verified
Raw
History Blame Contribute Delete
718 Bytes
services:
db:
image: postgres:16-alpine
restart: unless-stopped
environment:
POSTGRES_USER: ${POSTGRES_USER:-labour}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-labour}
POSTGRES_DB: ${POSTGRES_DB:-labour_connect}
volumes:
- pgdata:/var/lib/postgresql/data
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-labour}"]
interval: 5s
timeout: 5s
retries: 10
api:
build: .
restart: unless-stopped
env_file: .env
environment:
POSTGRES_HOST: db
depends_on:
db:
condition: service_healthy
ports:
- "8000:8000"
volumes:
pgdata: