37 lines
839 B
YAML
37 lines
839 B
YAML
services:
|
|
db:
|
|
image: postgres:17-alpine
|
|
container_name: netis-db
|
|
environment:
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: postgres
|
|
POSTGRES_DB: postgres
|
|
ports:
|
|
- "5432:5432"
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 10
|
|
|
|
app:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
container_name: netis-app
|
|
environment:
|
|
APP_ADDR: ":8000"
|
|
DATABASE_URL: "postgres://postgres:postgres@db:5432/postgres?sslmode=disable"
|
|
STATUS_AES_KEY_B64: "MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTIzNDU2Nzg5MDE="
|
|
ports:
|
|
- "8000:8000"
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
postgres_data:
|