forked from TabbycatDebate/tabbycat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
65 lines (57 loc) · 1.46 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
# Docker-compose is a way to run multiple containers at once and connect them
# This sets up and runs postgres and the django dev server as services
# Reference: https://docs.docker.com/compose/compose-file/
# Initial setup with
# $ docker-compose -f docker-compose.yml up
# Can run management commands with
# $ docker-compose run web /code/manage.py whatever
version: '3'
services:
db:
image: postgres:12
environment:
- POSTGRES_PASSWORD=tabbycat
- POSTGRES_USER=tabbycat
- POSTGRES_DB=tabbycat
volumes:
- pgdata:/var/lib/postgresql/data
redis:
image: redis:6
volumes:
- redis_data:/data
web:
build: .
# Hack to wait until Postgres is up before running things
command: ["./bin/docker-wait.sh", "--timeout=0", "db:5432", "--", "./bin/docker-run-honcho.sh"]
depends_on:
- db
- redis
expose:
- "8000"
environment:
- DEBUG=1
- IN_DOCKER=1
- DISABLE_SENTRY=1
- DOCKER_REDIS=1
- USING_NGINX=1
ports:
- "8000:8000"
working_dir: /tcd
worker:
build: .
# Hack to wait until migration is done before running things
command: ["./bin/docker-wait.sh", "--timeout=0", "web:8000", "--", "./bin/docker-run-worker.sh"]
depends_on:
- db
- redis
environment:
- DEBUG=1
- IN_DOCKER=1
- DISABLE_SENTRY=1
- DOCKER_REDIS=1
- USING_NGINX=1
working_dir: /tcd
volumes:
pgdata:
node_modules:
redis_data: