mirror of
https://github.com/hanzo-fi/stack.git
synced 2026-10-30 20:34:43 +00:00
Co-authored-by: Antoine Wacheux <[email protected]> Co-authored-by: Maxence Maireaux <[email protected]> Co-authored-by: Brieuc Caillot <[email protected]>
38 lines
828 B
YAML
38 lines
828 B
YAML
version: '3.8'
|
|
volumes:
|
|
postgres:
|
|
services:
|
|
postgres:
|
|
image: "postgres:15-alpine"
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U ledger"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
command:
|
|
- -c
|
|
- max_connections=200
|
|
environment:
|
|
POSTGRES_USER: "ledger"
|
|
POSTGRES_PASSWORD: "ledger"
|
|
POSTGRES_DB: "ledger"
|
|
PGDATA: /data/postgres
|
|
volumes:
|
|
- postgres:/data/postgres
|
|
|
|
ledger:
|
|
image: golang:1.19-alpine
|
|
entrypoint: go run main.go serve
|
|
volumes:
|
|
- .:/src
|
|
ports:
|
|
- 3068:3068
|
|
working_dir: /src
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
environment:
|
|
STORAGE_DRIVER: "postgres"
|
|
STORAGE_POSTGRES_CONN_STRING: "postgresql://ledger:ledger@postgres/ledger?sslmode=disable"
|
|
DEBUG: "true"
|