-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
72 lines (69 loc) · 1.74 KB
/
docker-compose.yml
File metadata and controls
72 lines (69 loc) · 1.74 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
version: "3.2"
services:
runserver:
build:
context: .
dockerfile: dockerfile/dev/Dockerfile
command: python manage.py runserver 0.0.0.0:8000
environment:
- SETTINGS_DB_HOST=${SETTINGS_DB_HOST:-postgresql}
- SETTINGS_DB_REPLICA_HOST=${SETTINGS_DB_REPLICA_HOST:-postgresql}
- SETTINGS_REDIS_HOST=${SETTINGS_REDIS_HOST:-redis}
env_file:
- .env
depends_on:
- postgresql
- redis
links:
- redis
- postgresql
ports:
- "8000:8000"
restart: always
volumes:
- .:/app/src
postgresql:
command: >
postgres
-c max_connections=50
-c shared_buffers=2GB
-c temp_buffers=256MB
-c work_mem=128MB
-c maintenance_work_mem=256MB
-c effective_cache_size=4GB
-c wal_buffers=16MB
-c max_wal_size=1GB
-c checkpoint_timeout=60min
-c checkpoint_completion_target=0.9
-c max_locks_per_transaction=1024
-c fsync=off
-c synchronous_commit=off
-c full_page_writes=off
-c log_statement=none
-c logging_collector=off
-c log_min_duration_statement=-1
-c log_min_error_statement=panic
environment:
- POSTGRES_INITDB_ARGS=--nosync
- POSTGRES_HOST_AUTH_METHOD=trust
- POSTGRES_USER=swat4stats
- POSTGRES_DB=swat4stats
- LANG=en_US.UTF-8
- LC_ALL=en_US.UTF-8
image: postgres:16.10-alpine
ports:
- "5432:5432"
tmpfs:
- /run
- /var/run
- /tmp
- /var/lib/postgresql/data
redis:
image: redis:8.2-alpine
command: redis-server --save '' --databases 100 --loglevel warning
logging:
driver: none
ports:
- "6379:6379"
tmpfs:
- /data