This repository has been archived by the owner on Mar 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 22
/
docker-compose.yml
79 lines (73 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
68
69
70
71
72
73
74
75
76
77
78
79
version: '3'
services:
# Run the wagtail app
backend:
build:
context: .
dockerfile: ./dockerfiles/Dockerfile.python
env_file:
- ".env"
command: ./dockerpythonvenv/bin/python manage.py runserver 0.0.0.0:8000
ports:
- "8000:8000"
- "8001:8001" # ptvsd port for debugging
volumes:
- .:/app:delegated
- dockerpythonvenv:/app/dockerpythonvenv/:delegated
depends_on:
- postgres
- redis
- watch-static-files
links:
- redis
# RQ Worker to process donations
backend-worker:
build:
context: .
dockerfile: ./dockerfiles/Dockerfile.python
command: ./dockerpythonvenv/bin/python manage.py rqworker default
volumes:
- .:/app:delegated
- dockerpythonvenv:/app/dockerpythonvenv/:delegated
depends_on:
- postgres
- redis
links:
- redis
# Database
postgres:
environment:
- POSTGRES_DB=donate
- POSTGRES_USER=donate
# We're only using this setting for local dev!
- POSTGRES_HOST_AUTH_METHOD=trust
image: postgres:11
ports:
- "5678:5432"
volumes:
- postgres_data:/var/lib/postgresql/data/:delegated
redis:
image: redis
container_name: 'redis'
ports:
- "6380:6379"
# Rebuild static files automatically
watch-static-files:
build:
context: .
dockerfile: ./dockerfiles/Dockerfile.node
env_file:
- .env
environment:
# Need to specify the SHELL env var for chokidar
- SHELL=/bin/sh
# Force polling because inotify doesn't work on Docker Windows
- CHOKIDAR_USEPOLLING=1
command: npm run watch
volumes:
- .:/app:delegated
- node_dependencies:/app/node_modules/:delegated
volumes:
postgres_data:
node_dependencies:
dockerpythonvenv: