36 lines
807 B
YAML
36 lines
807 B
YAML
version: "3.9"
|
|
|
|
services:
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_DB: forgebucket
|
|
POSTGRES_USER: forgebucket
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?required}
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U forgebucket"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 10
|
|
|
|
app:
|
|
build: .
|
|
restart: unless-stopped
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
env_file: .env
|
|
environment:
|
|
DATABASE_URL: postgres://forgebucket:${POSTGRES_PASSWORD}@postgres:5432/forgebucket?sslmode=disable
|
|
ports:
|
|
- "8080:8080"
|
|
volumes:
|
|
- repo_data:/var/lib/forgebucket/repos
|
|
|
|
volumes:
|
|
postgres_data:
|
|
repo_data:
|