Files
snapp/docker-compose.postgres.yml
urania-dev 741c1fc569 0.8.1
2024-08-09 10:52:30 +02:00

39 lines
830 B
YAML

services:
snapp:
image: uraniadev/snapp:latest
ports:
- 3000:3000
environment:
DATABASE_POSTGRES_URL: 'postgresql://postgres:password@postgres:5432/snappdb'
TOKEN_SECRET: # openssl rand -base64 32
ORIGIN: https://example.com
DATABASE_PROVIDER: postgres
depends_on:
postgres:
condition: service_healthy
networks:
- snapp
postgres:
image: postgres:latest
healthcheck:
test: ['CMD-SHELL', 'pg_isready -d snappdb -U postgres']
interval: 10s
timeout: 5s
retries: 5
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_DB: snappdb
volumes:
- postgres-data:/var/lib/postgresql/data
networks:
- snapp
networks:
snapp:
external: false
volumes:
postgres-data: