-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathdocker-compose.yml
49 lines (49 loc) · 1.07 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
version: '3'
services:
db:
image: postgres
environment:
POSTGRES_PASSWORD: secret
cache:
image: redis
restart: on-failure
worker:
build: .
image: <%= project_name %>
#env_file: .env
command: celery worker -A <%= project_name %>.celery --loglevel=info --logfile=worker.log -B
volumes:
- .:/app
links:
- db
- cache
web:
build: .
image: <%= project_name %>
#env_file: .env
restart: on-failure
command: gunicorn <%= project_name %>.wsgi -c <%= project_name %>/gunicorn.conf.py
#command: python manage.py runserver 0.0.0.0:8000
environment:
DATABASE_URL: psql://postgres:secret@db/postgres
REDIS_URL: redis://cache:6379
volumes:
- .:/app
ports:
- "8000:8000"
links:
- db
- cache
cli:
build: .
image: <%= project_name %>
#env_file: .env
entrypoint: python3 manage.py
environment:
DATABASE_URL: psql://postgres:secret@db/postgres
REDIS_URL: redis://cache:6379
volumes:
- .:/app
links:
- db
- cache