forked from tickHub/omslagroute
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
67 lines (65 loc) · 1.79 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
65
66
67
version: '3.5'
services:
database:
image: amsterdam/postgres11
shm_size: '512m'
ports:
- "5409:5432"
environment:
POSTGRES_DB: omslagroute
POSTGRES_USER: omslagroute
POSTGRES_PASSWORD: insecure
volumes:
- type: volume
source: pg_data
target: /var/lib/postgresql/data
web:
build: ./app/
env_file: .env
ports:
- "8088:8088"
environment:
- DJANGO_SETTINGS_MODULE=settings.settings
- DJANGO_SECRET_KEY=local
- DJANGO_DEBUG=True
- DJANGO_ALLOWED_HOSTS=0.0.0.0,localhost,*
- DJANGO_ROOT_URLCONF=web.urls
- DJANGO_STATIC_URL=/static/
- ADMIN_USERNAME=admin
- ADMIN_PASSWORD=insecure
- DATABASE_NAME=omslagroute
- DATABASE_USER=omslagroute
- DATABASE_PASSWORD=insecure
- DATABASE_HOST=database
- UWSGI_HTTP=0.0.0.0:8088
- UWSGI_MASTER=1
- UWSGI_STATIC_INDEX=index.html
- UWSGI_STATIC_MAP=/omslagroute/static=/static
- UWSGI_CALLABLE=application
- UWSGI_VACUUM=1
- UWSGI_STATIC_EXPIRES=/* 3600
- UWSGI_OFFLOAD_THREADS=1
- UWSGI_HARAKIRI=15
- UWSGI_DIE_ON_TERM=1
- UWSGI_ENABLE_THREADS=1
- UWSGI_MODULE=wsgi:application
volumes:
- ./app:/app
- ./media:/media
- ./app/deploy:/deploy
- ./.git:/.git
command: bash -c "
cd /app &&
npm install &&
./node_modules/.bin/node-sass -o ./assets/bundles/ static_src/sass &&
python ./manage.py collectstatic --noinput &&
python ./manage.py migrate --noinput &&
python ./manage.py initadmin --username admin --password insecure &&
python ./manage.py runserver 0.0.0.0:8088 --settings settings.settings"
depends_on:
- database
networks:
default:
name: omslagroute
volumes:
pg_data: