-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.test.yml
executable file
·56 lines (53 loc) · 1.14 KB
/
docker-compose.test.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
version: '3.8'
services:
# Backend API (with .env.test)
app:
build:
context: .
dockerfile: ./Dockerfile
target: development
container_name: nmt-app
restart: always
links:
- db
depends_on:
db:
condition: service_healthy
ports:
- '3000:3000'
env_file:
- environments/.env.test
volumes:
- '.:/usr/src/app'
- /usr/src/app/node_modules # ignore node_modules from local computer (take into account only inside of docker image)
networks:
- nmt-share_net
# Test database (postgres)
db:
image: 'postgres:latest'
container_name: nmt-db-test_container
restart: always
ports:
- '5433:5432'
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 5s
timeout: 5s
retries: 5
env_file:
- environments/.env.test
volumes:
- './backups:/backups'
networks:
- nmt-share_net
# Cache (Redis)
redis:
image: 'redis:latest'
container_name: nmt-redis_container
ports:
- '6379:6379'
networks:
- nmt-share_net
networks:
nmt-share_net:
driver: bridge