mirror of
https://github.com/hanzo-fi/payments.git
synced 2026-10-30 20:31:20 +00:00
155 lines
4.3 KiB
YAML
155 lines
4.3 KiB
YAML
version: '3.8'
|
|
volumes:
|
|
postgres:
|
|
|
|
services:
|
|
gateway:
|
|
image: ghcr.io/formancehq/gateway:latest
|
|
volumes:
|
|
- ./local_env/gateway/Caddyfile:/etc/caddy/Caddyfile
|
|
ports:
|
|
- 8092:80
|
|
environment:
|
|
DEBUG: true
|
|
|
|
postgres:
|
|
image: "postgres:14-alpine"
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U payments -p ${POSTGRES_PORT:-5432}"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
ports:
|
|
- "${POSTGRES_PORT:-5432}:${POSTGRES_PORT:-5432}"
|
|
environment:
|
|
POSTGRES_USER: "payments"
|
|
POSTGRES_PASSWORD: "payments"
|
|
POSTGRES_DB: "payments"
|
|
command: -p ${POSTGRES_PORT:-5432}
|
|
volumes:
|
|
- ./local_env/postgres/init.sql:/docker-entrypoint-initdb.d/init.sql
|
|
# Uncomment the volume below if you want to keep the data stored when killing the container.
|
|
#- postgres:/var/lib/postgresql/data
|
|
|
|
payments-migrate:
|
|
image: golang:1.26-alpine
|
|
command: go run ./ migrate up
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
volumes:
|
|
- .:/app/components/payments
|
|
working_dir: /app/components/payments
|
|
environment:
|
|
POSTGRES_URI: postgres://payments:payments@postgres:${POSTGRES_PORT:-5432}/payments?sslmode=disable
|
|
|
|
temporal:
|
|
image: temporalio/auto-setup:1.29.1
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
environment:
|
|
DB: postgres12
|
|
DB_PORT: 5432
|
|
POSTGRES_USER: payments
|
|
POSTGRES_PWD: payments
|
|
POSTGRES_SEEDS: postgres
|
|
DYNAMIC_CONFIG_FILE_PATH: config/dynamicconfig/development-sql.yaml
|
|
ports:
|
|
- 7233:7233
|
|
volumes:
|
|
- ./local_env/postgres/temporal-sql.yaml:/etc/temporal/config/dynamicconfig/development-sql.yaml
|
|
temporal-admin-tools:
|
|
container_name: temporal-admin-tools
|
|
depends_on:
|
|
- temporal
|
|
environment:
|
|
- TEMPORAL_ADDRESS=temporal:7233
|
|
- TEMPORAL_CLI_ADDRESS=temporal:7233
|
|
image: temporalio/admin-tools:1.29.1-tctl-1.18.4-cli-1.5.0
|
|
stdin_open: true
|
|
tty: true
|
|
temporal-ui:
|
|
container_name: temporal-ui
|
|
depends_on:
|
|
- temporal
|
|
environment:
|
|
- TEMPORAL_ADDRESS=temporal:7233
|
|
- TEMPORAL_CORS_ORIGINS=http://localhost:3000
|
|
image: temporalio/ui:2.44.0
|
|
ports:
|
|
- 8081:8080
|
|
|
|
payments:
|
|
image: golang:1.26-alpine
|
|
command: go run ./ server
|
|
healthcheck:
|
|
test: [ "CMD", "curl", "-f", "http://127.0.0.1:8080/_healthcheck" ]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
payments-migrate:
|
|
condition: service_completed_successfully
|
|
ports:
|
|
- "8080:8080"
|
|
- "9090:9090"
|
|
volumes:
|
|
- .:/app/components/payments
|
|
working_dir: /app/components/payments
|
|
environment:
|
|
DEBUG: true
|
|
POSTGRES_URI: postgres://payments:payments@postgres:${POSTGRES_PORT:-5432}/payments?sslmode=disable
|
|
CONFIG_ENCRYPTION_KEY: mysuperencryptionkey
|
|
TEMPORAL_ADDRESS: temporal:7233
|
|
PLUGIN_MAGIC_COOKIE: mysupercookie
|
|
TEMPORAL_INIT_SEARCH_ATTRIBUTES: true
|
|
STACK_URL: http://gateway:8092
|
|
STACK_PUBLIC_URL: ${STACK_PUBLIC_URL:-http://localhost:8080}
|
|
|
|
payments-worker:
|
|
image: golang:1.26-alpine
|
|
command: go run ./ worker
|
|
healthcheck:
|
|
test: [ "CMD", "curl", "-f", "http://127.0.0.1:8080/_healthcheck" ]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
payments-migrate:
|
|
condition: service_completed_successfully
|
|
ports:
|
|
- "9191:9090"
|
|
volumes:
|
|
- .:/app/components/payments
|
|
working_dir: /app/components/payments
|
|
environment:
|
|
DEBUG: true
|
|
POSTGRES_URI: postgres://payments:payments@postgres:${POSTGRES_PORT:-5432}/payments?sslmode=disable
|
|
CONFIG_ENCRYPTION_KEY: mysuperencryptionkey
|
|
TEMPORAL_ADDRESS: temporal:7233
|
|
PLUGIN_MAGIC_COOKIE: mysupercookie
|
|
TEMPORAL_INIT_SEARCH_ATTRIBUTES: true
|
|
STACK_URL: http://gateway:8092
|
|
STACK_PUBLIC_URL: ${STACK_PUBLIC_URL:-http://localhost:8080}
|
|
|
|
console:
|
|
image: ghcr.io/formancehq/console-v3:v2.6.2
|
|
ports:
|
|
- "3000:3000"
|
|
environment:
|
|
- PORT=3000
|
|
- MICRO_STACK=1
|
|
- API_STACK_URL=http://gateway:80/api
|
|
- COOKIE_SECRET=secret
|
|
- COOKIE_DOMAIN=localhost
|
|
depends_on:
|
|
- postgres
|
|
- gateway
|
|
- payments
|
|
- payments-worker
|