-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
70 lines (60 loc) · 1.4 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
version: '3.4'
x-env: &default-env
DATABASE_URL: postgres://postgres:password@postgres:5432/postgres
REDIS_URL: redis://redis:6379/0
EMAIL_HOST: mailhog
EMAIL_PORT: 1025
SECRET_KEY: ${SECRET_KEY}
AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID}
AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY}
AWS_STORAGE_BUCKET_NAME: ${AWS_STORAGE_BUCKET_NAME}
volumes:
pg_data: {}
services:
postgres:
image: postgres:11.8
environment:
# for development only!
- POSTGRES_PASSWORD=password
volumes:
- pg_data:/var/lib/postgresql/data
redis:
image: redis:5.0.7
mailhog:
image: mailhog/mailhog:v1.0.0
ports:
- '8025:8025'
- '1025:1025'
assets: &assets
build:
context: .
dockerfile: assets.dockerfile
privileged: true
volumes:
- .:/app
- /app/node_modules
watchjs:
<<: *assets
command: ['watchexec', '-w', 'static/src/js', '--', 'yarn', 'watch-js']
watchcss:
<<: *assets
command: ['watchexec', '-w', 'static/src/css', '--', 'yarn', 'watch-css']
django: &django
build:
context: .
dockerfile: django.dockerfile
restart: on-failure
privileged: true
environment: *default-env
depends_on:
- postgres
- redis
volumes:
- .:/app
ports:
- '80:8000'
command: /start-django
celeryworker:
<<: *django
ports: []
command: /start-celeryworker