-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.ci.yml
More file actions
71 lines (70 loc) · 2.13 KB
/
Copy pathdocker-compose.ci.yml
File metadata and controls
71 lines (70 loc) · 2.13 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
version: "3.7"
services:
db:
restart: "no"
build:
cache_from:
- $CI_REGISTRY_IMAGE/db:latest
- $CI_REGISTRY_IMAGE/db:edge
command:
# See https://wiki.postgresql.org/wiki/Tuning_Your_PostgreSQL_Server
# and https://www.postgresql.org/docs/10/static/runtime-config-resource.html
# and https://dev.to/pythonmeister/basic-postgresql-tuning-parameters-281
# and https://pgtune.leopard.in.ua/#/
# and https://sudonull.com/post/31544-How-One-PostgreSQL-Configuration-Change-Improves-Slow-Query-Performance-50-Times
- -c
- max_locks_per_transaction=2048
# Set shared buffers to 25% of allowable memory for the container
- -c
- shared_buffers=500MB
# Set effective_cache_size to 75% of allowable memory for the container
# i.e. 3 * shared_buffers
- -c
- effective_cache_size=1500MB
- -c
- work_mem=150MB
- -c
- maintenance_work_mem=200MB
- -c
- max_stack_depth=4096
- -c
- checkpoint_timeout=60min
- -c
- checkpoint_completion_target=0.9
- -c
- wal_buffers=16MB
- -c
- max_wal_size=10GB
# Set effective_io_concurrency to 200 for SSDs, or 1 for HDD
- -c
- effective_io_concurrency=200
# Set seq_page_cost to 0.1 for SSDs, or 1 for HDD
- -c
- seq_page_cost=0.1
# Set random_page_cost to 0.11 for SSDs, or 4 for HDD
- -c
- random_page_cost=0.11
# Set various additional parameters that improve speed at the risk of data corruption,
# which is fine for CI test databases, but should never be set in production.
- -c
- fsync=off
- -c
- synchronous_commit=off
- -c
- full_page_writes=off
app:
restart: "no"
build:
target: test
cache_from:
- $CI_REGISTRY_IMAGE/app:latest
- $CI_REGISTRY_IMAGE/app:edge
entrypoint:
- "/usr/src/app/docker/app/run_tests.sh"
command: ""
environment:
DJANGO_SETTINGS_MODULE: hea.settings.ci
# Put .coverage in a writable directory
COVERAGE_FILE: log/.coverage
depends_on:
- db