-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.test.yml
More file actions
83 lines (81 loc) · 1.84 KB
/
docker-compose.test.yml
File metadata and controls
83 lines (81 loc) · 1.84 KB
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
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/init-db.sh:/docker-entrypoint-initdb.d/init-db.sh
- ./api/test/db/test.sql.gz:/tmp/test.sql.gz
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_test
networks:
ajust_network:
ipv4_address: 173.0.0.20
expose:
- "8080"
depends_on:
- "db"
volumes:
- "./api/coverage:/home/api/coverage"
- "./api/test/reports:/home/api/test/reports"
environment:
- DATABASE_URL=postgres://ajust-user:ajust-pass@db:5432/ajust
- SERVER_URL=http://173.0.0.20:8080/api
- FRONT_URL=http://localhost:4200
- NODE_ENV=test
- JSON_WEB_TOKEN=123456789
- PORT=8080
networks:
ajust_network:
driver: bridge
ipam:
config:
- subnet: 173.0.0.0/16