-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose-e2e.test.yml
113 lines (109 loc) · 2.35 KB
/
docker-compose-e2e.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
version: "3.3"
services:
db:
image: postgres:10.4
restart: always
cpus: 2.0
mem_limit: 4G
ports:
- "5450:5432"
expose:
- "5432"
# networks:
# ajust_network:
# ipv4_address: 173.0.0.50
environment:
- POSTGRES_DB=ajust
- POSTGRES_USER=ajust-user
- POSTGRES_PASSWORD=ajust-pass
- TZ=Europe/Paris
volumes:
- ./api/test/db:/docker-entrypoint-initdb.d
command:
- "postgres"
- "-c"
- "max_connections=200"
- "-c"
- "shared_buffers=2GB"
- "-c"
- "effective_cache_size=6GB"
- "-c"
- "maintenance_work_mem=512MB"
- "-c"
- "checkpoint_completion_target=0.7"
- "-c"
- "wal_buffers=16MB"
- "-c"
- "default_statistics_target=100"
- "-c"
- "random_page_cost=4"
- "-c"
- "effective_io_concurrency=2"
- "-c"
- "work_mem=5242kB"
- "-c"
- "min_wal_size=1GB"
- "-c"
- "max_wal_size=4GB"
- "-c"
- "max_worker_processes=4"
- "-c"
- "max_parallel_workers_per_gather=2"
- "-c"
- "max_parallel_workers=4"
api:
build:
context: .
dockerfile: dockerfile_api
# networks:
# ajust_network:
# ipv4_address: 173.0.0.20
expose:
- "8080"
depends_on:
- "db"
volumes:
- "./api/coverage:/home/api/coverage"
environment:
- DATABASE_URL=postgres://ajust-user:ajust-pass@db:5432/ajust
- SERVER_URL=http://173.0.0.20:8080/api
- NODE_ENV=test
- JSON_WEB_TOKEN=123456789
- PORT=8080
web:
build:
context: .
dockerfile: dockerfile_front
environment:
- NODE_ENV=test
expose:
- "4200"
ports:
- "4300:4200"
depends_on:
- "api"
- "db"
cypress:
image: cypress/included:12.7.0
depends_on:
- "web"
- "api"
- "db"
entrypoint: /scripts/wait-for-it.sh web:4200 --timeout=300 -- cypress run
volumes:
- ./front:/e2e
- ./front/scripts:/scripts
working_dir: /e2e
environment:
- CYPRESS_BASE_URL=http://web:4200
healthcheck:
test: ["CMD", "curl", "-f", "http://web:4200"]
interval: 30s
timeout: 300s
retries: 5
# networks:
# ajust_network:
# driver: bridge
# ipam:
# config:
# - subnet: 173.0.0.0/16