-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.test.yml
65 lines (62 loc) · 1.46 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
57
58
59
60
61
62
63
64
65
version: "3.9"
services:
nginx:
image: nginx:1.17.10
restart: unless-stopped
expose:
- "80"
volumes:
- './nginx/recette.conf:/etc/nginx/conf.d/default.conf'
- './nginx/front/dist:/home/front'
depends_on:
- "api"
- "db"
api:
build:
context: .
dockerfile: dockerfile_api
expose:
- '8080'
depends_on:
- 'db'
environment:
- DATABASE_URL=${DATABASE_URL}
- EMPLOI_STORE_URL=${EMPLOI_STORE_URL}
- ENTERPRISE_URL=${ENTERPRISE_URL}
- EMPLOI_STORE_ID=${EMPLOI_STORE_ID}
- EMPLOI_STORE_SECRET=${EMPLOI_STORE_SECRET}
db:
image: mariadb:10
expose:
- "3306"
ports:
- "3308:3306"
environment:
- MYSQL_DATABASE=${MYSQL_DATABASE}
- MYSQL_USER=${MYSQL_USER}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
- MYSQL_ROOT_PASSWORD=${MYSQL_PASSWORD}
- TZ=Europe/Paris
volumes:
- ./tests/db:/docker-entrypoint-initdb.d
e2e:
image: cypress/included:3.2.0
depends_on:
- "nginx"
- "db"
- "api"
entrypoint: /scripts/wait-for-it.sh api:8080 -- cypress run
volumes:
- ./tests:/e2e
- ./scripts:/scripts
working_dir: /e2e
environment:
- CYPRESS_baseUrl=http://nginx
- NODE_ENV=test
- REACT_APP_ZEN_ENV=test
- TZ=Europe/Paris
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:80/api"]
interval: 30s
timeout: 10s
retries: 5