forked from mvantellingen/localshop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
46 lines (42 loc) · 1.18 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
version: '2.1'
services:
db:
image: postgres:10
environment:
- POSTGRES_DB=localshop
expose:
- 5432
volumes:
- ${PWD}:/code
redis:
image: redis:latest
web:
build: .
volumes:
- ${PWD}:/code
links:
- db:db
- redis:redis
environment:
- DJANGO_SECRET_KEY=a7d03faa0c054b3dba38b396bf3c7996
- DATABASE_URL=postgresql://postgres:postgres@db/localshop
- DJANGO_MEDIA_ROOT=/localshop/media
- CELERY_BROKER_URL=redis://redis:6379/0
- DEBUG=True
expose:
- 8000
command: uwsgi --http 0.0.0.0:8000 --module localshop.wsgi --master --die-on-term -p 2
# command: localshop collectstatic && uwsgi --http 0.0.0.0:8000 --module localshop.wsgi --master --die-on-term --static-map /static=/home/localshop/static
worker:
build: .
volumes:
- ${PWD}:/code
links:
- db:db
- redis:redis
environment:
- DJANGO_SECRET_KEY=a7d03faa0c054b3dba38b396bf3c7996
- DATABASE_URL=postgresql://postgres:postgres@db/localshop
- DJANGO_MEDIA_ROOT=/localshop/media
- CELERY_BROKER_URL=redis://redis:6379/0
command: celery -A localshop worker -B -E -l info