-
Notifications
You must be signed in to change notification settings - Fork 135
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
124 lines (115 loc) · 3.01 KB
/
Copy pathdocker-compose.yml
File metadata and controls
124 lines (115 loc) · 3.01 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
version: '3.8'
# Profiles:
# deps — postgres + redis only (useful for running services locally)
# backend — deps + backend API
# indexer — deps + indexer
# oracle — deps + oracle
# full — everything except client (backend + indexer + oracle + deps)
# client — adds the Vite dev server (optional; most devs run this locally)
services:
postgres:
image: postgres:16-alpine
profiles: [deps, backend, indexer, oracle, full, client]
environment:
POSTGRES_USER: ${POSTGRES_USER:-tikka}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-tikka-pass}
POSTGRES_DB: ${POSTGRES_DB:-tikka}
ports:
- "5432:5432"
volumes:
- postgres-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-tikka}"]
interval: 10s
timeout: 5s
retries: 5
redis:
image: redis:7-alpine
profiles: [deps, backend, indexer, oracle, full, client]
ports:
- "6379:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
backend:
build:
context: ./backend
dockerfile: Dockerfile
profiles: [backend, full, client]
ports:
- "3001:3001"
env_file: ./backend/.env.local
environment:
NODE_ENV: development
PORT: 3001
REDIS_URL: redis://redis:6379
INDEXER_URL: http://indexer:3002
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3001/health"]
interval: 10s
timeout: 5s
retries: 5
indexer:
build:
context: ./indexer
dockerfile: Dockerfile
profiles: [indexer, full, client]
ports:
- "3002:3002"
env_file: ./indexer/.env.local
environment:
NODE_ENV: development
DATABASE_URL: postgres://${POSTGRES_USER:-tikka}:${POSTGRES_PASSWORD:-tikka-pass}@postgres:5432/${POSTGRES_DB:-tikka}
REDIS_URL: redis://redis:6379
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3002/health"]
interval: 10s
timeout: 5s
retries: 5
oracle:
build:
context: ./oracle
dockerfile: Dockerfile
profiles: [oracle, full, client]
ports:
- "3003:3003"
env_file: ./oracle/.env.local
environment:
NODE_ENV: development
REDIS_URL: redis://redis:6379
depends_on:
redis:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3003/health"]
interval: 10s
timeout: 5s
retries: 5
client:
build:
context: ./client
dockerfile: Dockerfile
profiles: [client]
ports:
- "5173:5173"
env_file: ./client/.env.local
depends_on:
backend:
condition: service_healthy
networks:
default:
name: tikka-network
volumes:
postgres-data: