Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
99 lines (94 loc) · 2.67 KB
/
Copy pathdocker-compose.yml
File metadata and controls
99 lines (94 loc) · 2.67 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
services:
postgres:
image: postgres:latest
container_name: agora_postgres
environment:
POSTGRES_USER: ${POSTGRES_USER:-user}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-password}
POSTGRES_DB: ${POSTGRES_DB:-agora}
ports:
- "${POSTGRES_PORT:-5432}:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-user} -d ${POSTGRES_DB:-agora}"]
interval: 10s
timeout: 5s
retries: 5
redis:
image: redis:7
container_name: agora_redis
command: redis-server --appendonly yes
ports:
- "${REDIS_PORT:-6379}:6379"
volumes:
- redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
stellar-rpc:
image: stellar/quickstart:latest
container_name: agora_stellar_rpc
environment:
- STELLAR_CORE_URL=http://localhost:11626
- HORIZON_URL=http://localhost:8000
- NETWORK_PASSPHRASE=Test SDF Network ; September 2015
- NODE_IS_VALIDATOR=false
ports:
- "${STELLAR_RPC_PORT:-8000}:8000"
- "${STELLAR_CORE_PORT:-11626}:11626"
healthcheck:
test: ["CMD-SHELL", "curl -fsS http://localhost:8000/health >/dev/null 2>&1 || exit 1"]
interval: 30s
timeout: 10s
retries: 5
start_period: 40s
backend:
build:
context: ./server
dockerfile: Dockerfile
container_name: agora_backend
environment:
PORT: 3001
DATABASE_URL: postgres://${POSTGRES_USER:-user}:${POSTGRES_PASSWORD:-password}@postgres:5432/${POSTGRES_DB:-agora}
REDIS_URL: redis://redis:6379
SOROBAN_RPC_URL: http://stellar-rpc:8000/soroban/rpc
RUST_LOG: ${RUST_LOG:-info}
ports:
- "${BACKEND_PORT:-3001}:3001"
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
stellar-rpc:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "curl -fsS http://localhost:3001/api/v1/health >/dev/null"]
interval: 30s
timeout: 5s
retries: 3
start_period: 20s
frontend:
build:
context: ./apps/web
dockerfile: Dockerfile
container_name: agora_frontend
environment:
NEXT_PUBLIC_API_URL: ${NEXT_PUBLIC_API_URL:-http://localhost:3001/api/v1}
ports:
- "${FRONTEND_PORT:-3000}:3000"
depends_on:
backend:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "curl -fsS http://localhost:3000 >/dev/null 2>&1 || exit 1"]
interval: 30s
timeout: 5s
retries: 3
start_period: 20s
volumes:
postgres_data:
redis_data: