-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
56 lines (52 loc) · 1.27 KB
/
Copy pathdocker-compose.yml
File metadata and controls
56 lines (52 loc) · 1.27 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
version: '3'
services:
web:
build: .
depends_on:
- postgres
- redis
expose:
- 8000
ports:
- "8000:8000"
volumes:
- .:/fallout
stdin_open: true
tty: true
environment:
DJANGO_SETTINGS_MODULE: 'rpg.settings'
DJANGO_CONFIGURATION: 'Test'
DJANGO_SECRET_KEY: '1'
DJANGO_REDIS_CACHE: 'redis:6379:1'
DJANGO_CELERY_BROKER_URL: 'redis://redis:6379/1'
DATABASE_URL: 'postgres://fallout:fallout@postgres:5432/fallout'
command: >
bash -c "python manage.py migrate --no-input &&
python manage.py collectstatic --no-input &&
python manage.py compilemessages &&
python manage.py loaddata admin &&
python manage.py loaddata items &&
python manage.py loaddata creatures &&
python manage.py runserver 0.0.0.0:8000"
postgres:
image: postgres:latest
restart: always
environment:
- POSTGRES_USER=fallout
- POSTGRES_PASSWORD=fallout
- POSTGRES_DB=fallout
- PGDATA=/fallout
ports:
- 5432
volumes:
- pgdata:/fallout
redis:
image: redis:latest
restart: always
ports:
- 6379
volumes:
- redisdata:/fallout
volumes:
pgdata:
redisdata: