forked from MentorsMind/MentorsMind-Backend
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.test.yml
More file actions
46 lines (42 loc) · 1.07 KB
/
Copy pathdocker-compose.test.yml
File metadata and controls
46 lines (42 loc) · 1.07 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
# Integration tests in Docker (CI or local). Uses builder stage so Jest + ts-jest are available.
# Env file: .env.docker.test (committed; Docker network hostnames for postgres/redis).
services:
test-backend:
build:
context: .
dockerfile: Dockerfile
target: builder
env_file:
- .env.docker.test
command: npm run test -- --runInBand --coverage
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
networks:
- mentorminds-test-network
postgres:
image: postgres:15-alpine
env_file:
- .env.docker.test
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"]
interval: 5s
timeout: 3s
retries: 10
start_period: 5s
networks:
- mentorminds-test-network
redis:
image: redis:7-alpine
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 5
start_period: 5s
networks:
- mentorminds-test-network
networks:
mentorminds-test-network: