-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yml
64 lines (59 loc) · 1.87 KB
/
docker-compose.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
version: '3.7'
services:
app:
build:
context: .
dockerfile: docker/Dockerfile
command: uwsgi --module ngt_archive.wsgi:application --http-socket 0.0.0.0:8088 --static-map /static=/app/static
environment:
- DATABASE=postgres
- SQL_HOST=db
- SQL_PASSWORD=a_secret
- SQL_USER=ngeet
- SQL_DATABASE=ngeet
- SQL_ENGINE=django.db.backends.postgresql_psycopg2
- EMAIL_NGEET_TEAM=$EMAIL_NGEET_TEAM
- EMAIL_SUBJECT_PREFIX=$EMAIL_SUBJECT_PREFIX
- GOOGLE_MAPS_KEY=$GOOGLE_MAPS_KEY
- FILE_UPLOAD_TEMP_DIR=${FILE_UPLOAD_TEMP_DIR:-/tmp}
- SECRET_KEY=$SECRET_KEY
- ADMIN_EMAIL=$ADMIN_EMAIL
- STATIC_ROOT=${STATIC_ROOT:-/app/static}
- AUTH_LDAP_SERVER_URI=$AUTH_LDAP_SERVER_URI
- AUTH_LDAP_BIND_DN=$AUTH_LDAP_BIND_DN
- AUTH_LDAP_BIND_PASSWORD=$AUTH_LDAP_BIND_PASSWORD
- AUTH_LDAP_USER_SEARCH=$AUTH_LDAP_USER_SEARCH
- DATASET_ARCHIVE_ROOT=${DATASET_ARCHIVE_ROOT:-/data}
- DJANGO_LOG_LEVEL=DEBUG
volumes:
- ${PWD}/.data:/data
- ${PWD}/.tmp:/tmp
depends_on:
- db
ports:
- 8088:8088
web:
image: nginx
depends_on:
- app
volumes:
- ${PWD}/static:/usr/share/nginx/html:ro
- ${PWD}/docker/nginx:/etc/nginx/conf.d:ro
ports:
- 8000:8000
db:
hostname: db
image: postgres:12-alpine
# postgres (setting to sane development configuration parameters)
# shared_bufferes (25% of RAM),
# effective_cache_size (50% RAM, could go to 75%)
# work_mem (total RAM / 3 / max_connections)
command: postgres -c 'max_connections=200' -c 'shared_buffers=512MB' -c 'effective_cache_size=4GB' -c 'work_mem=4MB'
environment:
POSTGRES_PASSWORD: a_secret
POSTGRES_USER: ngeet
volumes:
- postgres-volume:/var/lib/postgresql/data
volumes:
postgres-volume:
external: false