-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
77 lines (70 loc) · 1.55 KB
/
docker-compose.yml
File metadata and controls
77 lines (70 loc) · 1.55 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
73
74
75
76
77
# 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
services:
db:
image: postgres:18
environment:
- POSTGRES_PASSWORD=tabbycat
- POSTGRES_USER=tabbycat
- POSTGRES_DB=tabbycat
volumes:
- pgdata:/var/lib/postgresql
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: