generated from JanEveraertEHB/Portfolio-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.test.yml
49 lines (44 loc) · 1016 Bytes
/
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
version: '3.8'
services:
database:
image: postgres:16.0
restart: unless-stopped
container_name: movieclub_postgres
env_file:
- .env.test
environment:
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_DB: ${POSTGRES_DB}
networks:
- movieclub
volumes:
- ./_volumes/postgres-data:/var/lib/postgresql/data
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $POSTGRES_USER -d $POSTGRES_DB"]
interval: 5s
timeout: 5s
retries: 10
api:
container_name: movieclub_backend
build: ./images/api/
ports:
- "6200:6200"
volumes:
- ./images/api/src:/usr/src/app
- ./.git:/usr/app/.git
networks:
- movieclub
depends_on:
postgres:
condition: service_healthy
command: [ "npm", "run", "test" ]
stdin_open: false
tty: true
networks:
movieclub:
driver: bridge
volumes:
postgres-data: