forked from BobaBoard/boba-backend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.test.yml
33 lines (33 loc) · 1021 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
version: "3"
services:
database:
image: "postgres:12"
env_file:
- .env
ports:
- "35432:5432"
volumes:
- ./db:/docker-entrypoint-initdb.d
environment:
TZ: "America/Los_Angeles"
test:
image: "bobaserver"
network_mode: "host"
build:
context: .
environment:
TZ: "America/Los_Angeles"
JEST_JUNIT_OUTPUT_DIR: ./reports/junit/
command: >
sh -c "/usr/src/git/wait-for-it/wait-for-it.sh 127.0.0.1:35432 -t 60 -- sleep 10 && \
yarn run test --ci --testNamePattern='^((?!ci\-disable).)*$$' --reporters=default --reporters=jest-junit && \
yarn run test --ci --testNamePattern='^ci\-disable.*$$' --reporters=default --reporters=jest-junit"
volumes:
- .:/usr/src/app
# Below line prevents Docker from mapping the host's node_modules/
# folder into the container. We don't want cross-contamination.
- /usr/src/app/node_modules
ports:
- 3000:3000
depends_on:
- database