forked from noahsaso/argus
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.dev.yml
More file actions
144 lines (137 loc) · 3.55 KB
/
compose.dev.yml
File metadata and controls
144 lines (137 loc) · 3.55 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
services:
server:
image: node:22-alpine
command: sh -c "rm -f .ready; npm install && npm run build:only; npm run db:init -- -d && npm run db:seed:dev && touch .ready && npm run serve:dev:nodocker"
working_dir: /usr/src/app
ports:
- 3420:3420 # server
- 9227:9227 # debug
volumes:
# use local files as source
- .:/usr/src/app
environment:
NODE_ENV: development
# contains db connection info that matches db service setup below
CONFIG_FILE: config-dev.json
# waits for db and redis to start
depends_on:
db_accounts:
condition: service_healthy
db_data:
condition: service_healthy
redis:
condition: service_healthy
# check if app is built by looking for a ready file
healthcheck:
test: ['CMD-SHELL', 'test -f .ready']
interval: 2s
timeout: 3s
retries: 30
start_period: 15s
# colorizes output
tty: true
# start listener once app is built
listener:
image: node:22-alpine
command: npm run listener
working_dir: /usr/src/app
ports:
- 3421:3420 # health probe
volumes:
- .:/usr/src/app
environment:
NODE_ENV: development
# contains db connection info that matches db service setup below
CONFIG_FILE: config-dev.json
# waits for db and redis to start, and server to be done building
depends_on:
db_accounts:
condition: service_healthy
db_data:
condition: service_healthy
redis:
condition: service_healthy
server:
condition: service_healthy
# colorizes output
tty: true
# start workers once app is built
workers:
image: node:22-alpine
command: npm run workers
working_dir: /usr/src/app
volumes:
- .:/usr/src/app
environment:
NODE_ENV: development
# contains db connection info that matches db service setup below
CONFIG_FILE: config-dev.json
# waits for db and redis to start, and server to be done building
depends_on:
db_accounts:
condition: service_healthy
db_data:
condition: service_healthy
redis:
condition: service_healthy
server:
condition: service_healthy
# colorizes output
tty: true
db_accounts:
image: postgres:17-alpine
# matches config in config-dev.json
environment:
POSTGRES_DB: dev_accounts
POSTGRES_USER: dev
POSTGRES_PASSWORD: dev
volumes:
- db_accounts_data:/var/lib/postgresql/data
ports:
- '5432:5432'
healthcheck:
test: ['CMD-SHELL', 'pg_isready -d dev_accounts -U dev']
interval: 1s
timeout: 3s
retries: 5
db_data:
image: timescale/timescaledb:2.18.1-pg17
# matches config in config-dev.json
environment:
POSTGRES_DB: dev_data
POSTGRES_USER: dev
POSTGRES_PASSWORD: dev
volumes:
- db_data_data:/var/lib/postgresql/data
ports:
- '5433:5432'
healthcheck:
test: ['CMD-SHELL', 'pg_isready -d dev_data -U dev']
interval: 1s
timeout: 3s
retries: 5
redis:
image: redis:7-alpine
ports:
- '6379:6379'
volumes:
- redis_data:/data
healthcheck:
test: ['CMD-SHELL', 'redis-cli ping']
interval: 1s
timeout: 3s
retries: 5
meilisearch:
image: getmeili/meilisearch:latest
environment:
- MEILI_MASTER_KEY=masterKey
ports:
- '7700:7700'
volumes:
- meilisearch_data:/meili_data
volumes:
node_modules:
redis_data:
meilisearch_data:
db_data_data:
db_accounts_data: