forked from MetroLogic/fluxapay
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.ci.yml
More file actions
62 lines (59 loc) · 2.07 KB
/
Copy pathdocker-compose.ci.yml
File metadata and controls
62 lines (59 loc) · 2.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# Docker Compose for CI/CD Integration Tests
# This file is used to spin up PostgreSQL for backend integration tests
version: '3.8'
services:
postgres:
image: postgres:15-alpine
container_name: fluxapay-ci-postgres
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: fluxapay_test
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
# Ephemeral storage for CI (data doesn't persist)
tmpfs:
- /var/lib/postgresql/data
backend:
build:
context: ./fluxapay_backend
dockerfile: Dockerfile.ci
container_name: fluxapay-ci-backend
environment:
NODE_ENV: test
PORT: 3000
DATABASE_URL: postgresql://postgres:postgres@postgres:5432/fluxapay_test?schema=public
JWT_SECRET: ci-test-jwt-secret-key-for-integration-testing-only
WEBHOOK_SECRET: ci-test-webhook-secret
CLOUDINARY_CLOUD_NAME: test
CLOUDINARY_API_KEY: test
CLOUDINARY_API_SECRET: test
RESEND_API_KEY: re_test
STELLAR_HORIZON_URL: https://horizon-testnet.stellar.org
STELLAR_NETWORK_PASSPHRASE: Test SDF Network ; September 2015
FUNDER_SECRET_KEY: SBXEHJKWF7C7BIFSUGXZE7XKFJ5SP6Y7JGPD4J4TKMX2MQXWQQRF3BSG
MASTER_VAULT_SECRET_KEY: SDGHCAPDRWTOTBAQT6HJ5KBUZOECD2JEOH6E76NDL4OXNBXIWODLZA4B
USDC_ISSUER_PUBLIC_KEY: GBVXGET7UCLTTLDZGVWDDMZ7FVLCNZL75GU7BLVPTWUP6UIVYHAY5OAX
KMS_PROVIDER: local
KMS_ENCRYPTION_PASSPHRASE: ci-test-passphrase-for-hd-wallet-secure
HD_WALLET_MASTER_SEED: ci-test-master-seed-32chars-long-padded!!
DISABLE_CRON: "true"
ADMIN_SECRET: ci-admin-secret-key
E2E_ACCEPT_OTP: ${E2E_ACCEPT_OTP:-}
ports:
- "3000:3000"
depends_on:
postgres:
condition: service_healthy
command: ["sh", "-c", "npx prisma db push --skip-generate && npm start"]
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/health"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s