-
Notifications
You must be signed in to change notification settings - Fork 268
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
149 lines (142 loc) · 3.97 KB
/
Copy pathdocker-compose.yml
File metadata and controls
149 lines (142 loc) · 3.97 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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
services:
redis:
image: redis:7-alpine
ports:
- '${REDIS_PORT:-6379}:6379'
volumes:
- redis_data:/data
restart: unless-stopped
healthcheck:
test: ['CMD', 'redis-cli', 'ping']
interval: 10s
timeout: 3s
retries: 5
app:
build:
context: .
target: production
ports:
- '${WEB_PORT:-8080}:80'
environment:
- NODE_ENV=production
- REDIS_URL=${REDIS_URL:-redis://redis:6379}
restart: unless-stopped
depends_on:
api:
condition: service_healthy
healthcheck:
test: ['CMD', 'wget', '-qO-', 'http://localhost/health']
interval: 30s
timeout: 3s
retries: 3
profiles: [production]
app-dev:
image: node:22-alpine
working_dir: /app
volumes:
- .:/app
- /app/node_modules
ports:
- '${WEB_PORT:-5173}:5173'
command: npm run dev -- --host
environment:
- NODE_ENV=development
- VITE_API_URL=${VITE_API_URL:-http://localhost:4000}
depends_on:
api:
condition: service_healthy
profiles: [dev, local]
api:
build:
context: .
target: api
ports:
- '${API_PORT:-4000}:4000'
environment:
- NODE_ENV=${NODE_ENV:-development}
- PORT=4000
- REDIS_URL=${REDIS_URL:-redis://redis:6379}
depends_on:
redis:
condition: service_healthy
restart: unless-stopped
healthcheck:
test: ['CMD', 'wget', '-qO-', 'http://localhost:4000/health']
interval: 10s
timeout: 3s
retries: 3
start_period: 5s
profiles: [dev, production, api]
api-canary:
build:
context: .
target: api
ports:
- '4001:4000'
environment:
- NODE_ENV=production
- CANARY=true
- PORT=4000
- REDIS_URL=${REDIS_URL:-redis://redis:6379}
depends_on:
redis:
condition: service_healthy
restart: 'no'
healthcheck:
test: ['CMD', 'wget', '-qO-', 'http://localhost:4000/health']
interval: 5s
timeout: 2s
retries: 3
start_period: 3s
profiles: [canary]
# ── Local development network (#1004) ─────────────────────────────────────
# One-command stack: docker compose --profile local up -d
#
# `stellar` runs the official Stellar Quickstart image in standalone mode:
# Horizon http://localhost:8000
# Friendbot http://localhost:8000/friendbot
# Soroban RPC http://localhost:8000/rpc
# Stellar Lab http://localhost:8000/lab
# Passphrase Standalone Network ; February 2017
#
# The named volume keeps ledger state across restarts. Reset the whole chain
# (and re-seed from scratch) with: docker compose --profile local down -v
# Re-run the seeder any time with: docker compose --profile local up seed
#
# DEVELOPMENT ONLY: the standalone network is throwaway test infrastructure
# and the seeder uses deterministic, publicly-known keys. Never fund these
# accounts on testnet or mainnet.
stellar:
image: stellar/quickstart:latest
command: --local
ports:
- '8000:8000'
volumes:
- stellar_local_data:/opt/stellar
healthcheck:
test: ['CMD', 'curl', '-sf', 'http://localhost:8000']
interval: 10s
timeout: 5s
retries: 30
start_period: 60s
restart: unless-stopped
profiles: [local]
# One-shot seeder: funds deterministic accounts via the local friendbot,
# issues XDEMO/USDC, creates sell offers and a liquidity pool, and deploys
# the XDEMO asset contract. Idempotent — safe to re-run after partial runs.
seed:
build:
context: .
target: api
command: node scripts/seed-local-stellar.mjs
environment:
- STELLAR_SEED_HORIZON_URL=http://stellar:8000
- STELLAR_SEED_RPC_URL=http://stellar:8000/rpc
depends_on:
stellar:
condition: service_healthy
restart: 'no'
profiles: [local]
volumes:
redis_data:
stellar_local_data: