mirror of
https://github.com/hanzo-fi/payments.git
synced 2026-10-30 20:31:20 +00:00
124 lines
3.5 KiB
YAML
124 lines
3.5 KiB
YAML
version: '3.8'
|
|
volumes:
|
|
postgres:
|
|
|
|
services:
|
|
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
|
|
|
|
payments-migrate:
|
|
image: golang:1.23.4-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.25.0
|
|
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.25.0-tctl-1.18.1-cli-1.0.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.26.2
|
|
ports:
|
|
- 8081:8080
|
|
|
|
payments:
|
|
image: golang:1.23.4-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
|
|
|
|
payments-worker:
|
|
image: golang:1.23.4-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: false
|