-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathcompose.test.yml
More file actions
47 lines (44 loc) · 1.05 KB
/
compose.test.yml
File metadata and controls
47 lines (44 loc) · 1.05 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
services:
test:
image: node:22-alpine
command: sh -c "npm install && npm run test"
working_dir: /usr/src/app
ports:
- 9227:9227 # debug
volumes:
# use local files as source
- .:/usr/src/app
environment:
NODE_ENV: test
INTEGRATION_TESTS: true
# contains db connection info that matches db service setup below
CONFIG_FILE: config-test.json
# waits for db and redis to start
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
# colorizes output
tty: true
db:
image: timescale/timescaledb:2.18.1-pg17
# matches config in config-test.json
environment:
POSTGRES_DB: test
POSTGRES_USER: test
POSTGRES_PASSWORD: test
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U test']
interval: 1s
timeout: 3s
retries: 5
redis:
image: redis:7-alpine
healthcheck:
test: ['CMD-SHELL', 'redis-cli ping']
interval: 1s
timeout: 3s
retries: 5
volumes:
node_modules: