forked from Mitch5000/carbonledger
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
132 lines (124 loc) · 4.41 KB
/
Copy pathdocker-compose.yml
File metadata and controls
132 lines (124 loc) · 4.41 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
version: "3.9"
services:
postgres:
image: postgres:16-alpine
restart: unless-stopped
environment:
POSTGRES_DB: carbonledger
POSTGRES_USER: carbonledger
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-changeme}
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U carbonledger"]
interval: 10s
timeout: 5s
retries: 5
redis:
image: redis:7-alpine
restart: unless-stopped
command: redis-server --requirepass ${REDIS_PASSWORD:-}
ports:
- "6379:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
backend:
build:
context: ./backend
dockerfile: Dockerfile
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
environment:
DATABASE_URL: postgresql://carbonledger:${POSTGRES_PASSWORD:-changeme}@postgres:5432/carbonledger
JWT_SECRET: ${JWT_SECRET}
JWT_EXPIRY: 7d
STELLAR_NETWORK: ${STELLAR_NETWORK:-testnet}
STELLAR_RPC_URL: ${STELLAR_RPC_URL:-https://soroban-testnet.stellar.org}
FRONTEND_URL: http://localhost:3000
PORT: 3001
REDIS_HOST: redis
REDIS_PORT: 6379
REDIS_PASSWORD: ${REDIS_PASSWORD:-}
ports:
- "3001:3001"
command: >
sh -c "npx prisma migrate deploy && node dist/main"
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
restart: unless-stopped
depends_on:
- backend
environment:
NEXT_PUBLIC_API_URL: http://localhost:3001/api/v1
NEXT_PUBLIC_STELLAR_NETWORK: ${STELLAR_NETWORK:-testnet}
NEXT_PUBLIC_HORIZON_URL: ${STELLAR_HORIZON_URL:-https://horizon-testnet.stellar.org}
NEXT_PUBLIC_SOROBAN_RPC_URL: ${STELLAR_RPC_URL:-https://soroban-testnet.stellar.org}
NEXT_PUBLIC_REGISTRY_CONTRACT: ${CARBON_REGISTRY_CONTRACT_ID}
NEXT_PUBLIC_CREDIT_CONTRACT: ${CARBON_CREDIT_CONTRACT_ID}
NEXT_PUBLIC_MARKETPLACE_CONTRACT: ${CARBON_MARKETPLACE_CONTRACT_ID}
NEXT_PUBLIC_ORACLE_CONTRACT: ${CARBON_ORACLE_CONTRACT_ID}
NEXT_PUBLIC_USDC_CONTRACT: ${USDC_CONTRACT_ID}
ports:
- "3000:3000"
oracle_verification:
build:
context: ./oracle
dockerfile: Dockerfile
restart: unless-stopped
environment:
ORACLE_SECRET_KEY: ${ORACLE_SECRET_KEY}
CARBON_ORACLE_CONTRACT_ID: ${CARBON_ORACLE_CONTRACT_ID}
CARBON_REGISTRY_CONTRACT_ID: ${CARBON_REGISTRY_CONTRACT_ID}
STELLAR_RPC_URL: ${STELLAR_RPC_URL:-https://soroban-testnet.stellar.org}
DATABASE_URL: postgresql://carbonledger:${POSTGRES_PASSWORD:-changeme}@postgres:5432/carbonledger
ADMIN_ALERT_WEBHOOK: ${ADMIN_ALERT_WEBHOOK}
GOLD_STANDARD_API_URL: ${GOLD_STANDARD_API_URL}
GOLD_STANDARD_API_KEY: ${GOLD_STANDARD_API_KEY}
VERRA_VCS_API_URL: ${VERRA_VCS_API_URL}
VERRA_VCS_API_KEY: ${VERRA_VCS_API_KEY}
command: python3 verification_listener.py
depends_on:
- postgres
oracle_price:
build:
context: ./oracle
dockerfile: Dockerfile
restart: unless-stopped
environment:
ORACLE_SECRET_KEY: ${ORACLE_SECRET_KEY}
CARBON_ORACLE_CONTRACT_ID: ${CARBON_ORACLE_CONTRACT_ID}
STELLAR_RPC_URL: ${STELLAR_RPC_URL:-https://soroban-testnet.stellar.org}
XPANSIV_API_KEY: ${XPANSIV_API_KEY}
TOUCAN_API_KEY: ${TOUCAN_API_KEY}
ADMIN_ALERT_WEBHOOK: ${ADMIN_ALERT_WEBHOOK}
command: python3 price_oracle.py
oracle_satellite:
build:
context: ./oracle
dockerfile: Dockerfile
restart: unless-stopped
environment:
ORACLE_SECRET_KEY: ${ORACLE_SECRET_KEY}
CARBON_ORACLE_CONTRACT_ID: ${CARBON_ORACLE_CONTRACT_ID}
STELLAR_RPC_URL: ${STELLAR_RPC_URL:-https://soroban-testnet.stellar.org}
BACKEND_API_URL: http://backend:3001/api/v1
GEE_WEBHOOK_SECRET: ${GEE_WEBHOOK_SECRET}
ADMIN_ALERT_WEBHOOK: ${ADMIN_ALERT_WEBHOOK}
SATELLITE_MONITOR_PORT: 5001
command: python3 satellite_monitor.py
ports:
- "5001:5001"
volumes:
postgres_data:
redis_data: