forked from MozillaFoundation/donate-wagtail
-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
72 lines (66 loc) · 1.5 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
version: '3'
services:
# Run the wagtail app
backend:
build:
context: .
dockerfile: ./dockerfiles/Dockerfile.python
command: pipenv run python manage.py runserver 0.0.0.0:8000
ports:
- "8000:8000"
volumes:
- .:/app:delegated
depends_on:
- postgres
- redis
- watch-static-files
links:
- redis
# RQ Worker to process donations
backend-worker:
build:
context: .
dockerfile: ./dockerfiles/Dockerfile.python
command: pipenv run python manage.py rqworker default
volumes:
- .:/app:delegated
depends_on:
- postgres
- redis
links:
- redis
# Database
postgres:
environment:
- POSTGRES_USER=donate
- POSTGRES_PASSWORD=mozilla
- POSTGRES_DB=donate
image: postgres:11
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data/:delegated
redis:
image: redis
container_name: 'redis'
ports:
- "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: