-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
139 lines (129 loc) · 3.65 KB
/
docker-compose.yml
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
version: '3.8'
services:
postgres:
image: postgres
restart: always
volumes:
- ./docker/init.sql:/docker-entrypoint-initdb.d/init.sql
- postgres_data:/var/lib/postgresql/data
environment:
- POSTGRES_USERNAME=${POSTGRES_USERNAME:-actias}
- POSTGRES_PASSWORD=${POSTGRES_USERNAME:-secret}
scylla:
image: scylladb/scylla
container_name: scylla
volumes:
- scylla_data:/var/lib/scylla
healthcheck:
test: [ "CMD-SHELL", "[ $$(nodetool statusgossip) = running ]" ]
interval: 30s
timeout: 10s
retries: 5
script_service:
image: ghcr.io/jsh32/actias_script_service:latest
restart: unless-stopped
depends_on:
- postgres
build:
context: .
dockerfile: ./docker/Dockerfile.rust
args:
CRATE_NAME: actias-script-service
environment:
- PORT=3000
- DATABASE_URL=postgresql://${POSTGRES_USERNAME:-actias}:${POSTGRES_PASSWORD:-secret}@postgres/actias_script_service
script_service_migration:
image: ghcr.io/jsh32/actias_script_service_migration:latest
depends_on:
- postgres
build:
context: ./actias-script-service
dockerfile: ./Dockerfile.migration
environment:
- DATABASE_URL=postgresql://${POSTGRES_USERNAME:-actias}:${POSTGRES_PASSWORD:-secret}@postgres/actias_script_service
worker_service:
image: ghcr.io/jsh32/actias_worker_service:latest
restart: unless-stopped
depends_on:
- script_service
build:
context: .
dockerfile: ./docker/Dockerfile.rust
args:
CRATE_NAME: actias-worker
environment:
- PORT=3000
- SCRIPT_SERVICE_URI=http://script_service:3000
- KV_SERVICE_URI=http://kv_service:3000
ports:
- 3002:3000
kv_migration:
image: ghcr.io/jsh32/actias_kv_service_migration:latest
depends_on:
scylla:
condition: service_healthy
build:
context: ./actias-kv
dockerfile: ./Dockerfile.migration
environment:
- CQL_HOSTS=scylla
kv_service:
image: ghcr.io/jsh32/actias_kv_service:latest
restart: unless-stopped
build:
context: .
dockerfile: ./docker/Dockerfile.rust
args:
CRATE_NAME: actias-kv
depends_on:
scylla:
condition: service_healthy
environment:
- PORT=3000
- SCYLLA_NODES=scylla:9042
actias_api_migration:
image: ghcr.io/jsh32/actias_api_migration:latest
depends_on:
- postgres
build:
context: ./actias-api
dockerfile: ./Dockerfile.migration
environment:
- DATABASE_URL=postgresql://${POSTGRES_USERNAME:-actias}:${POSTGRES_PASSWORD:-secret}@postgres/actias_api
actias_api:
image: ghcr.io/jsh32/actias_api:latest
restart: unless-stopped
ports:
- 3001:3000
build:
context: .
dockerfile: ./docker/Dockerfile.api
depends_on:
- postgres
- kv_service
- script_service
environment:
- INVITE_ONLY=${INVITE_ONLY:-false}
- SCRIPT_SERVICE_URL=script_service:3000
- KV_SERVICE_URL=kv_service:3000
- JWT_KEY=${JWT_KEY:-secret}
- PORT=3000
- DATABASE_URL=postgresql://${POSTGRES_USERNAME:-actias}:${POSTGRES_PASSWORD:-secret}@postgres/actias_api
- WEB_ORIGIN=${WEB_ORIGIN:-http://localhost:3000}
actias_web:
image: ghcr.io/jsh32/actias_web:latest
restart: unless-stopped
ports:
- 3000:3000
build:
context: ./actias-web
depends_on:
- actias_api
environment:
- NODE_ENV=production
- PORT=3000
- API_URL=${API_URL:-http://localhost:3001}
- WORKER_BASE=${WORKER_URL:-http://localhost:3002}/_IDENTIFIER_
volumes:
scylla_data:
postgres_data: