-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeploy.yml
65 lines (59 loc) · 1.27 KB
/
deploy.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
version: "3"
services:
nginx:
build:
context: .
dockerfile: nginx/nginx.dockerfile
ports:
- 1300:80
volumes:
- ./gcartapp:/gcartapp
- ./gcartapp/container/media:/vol/web/media
- ./gcartapp/container/static:/vol/web/static
depends_on:
- gcartapp
restart: "on-failure"
gcartapp:
build:
context: .
dockerfile: gcartapp/python.dockerfile
volumes:
- ./gcartapp:/gcartapp
- ./gcartapp/container/media:/vol/web/media
- ./gcartapp/container/static:/vol/web/static
ports:
- 8000:8000
command: >
sh -c "
python manage.py wait_for_db &&
python manage.py makemigrations &&
python manage.py migrate &&
gunicorn core.wsgi:application --bind 0.0.0.0:8000 --reload"
depends_on:
- db
- redis
links:
- redis
db:
image: mysql:8.0
volumes:
- ./data:/var/lib/mysql
env_file:
- db/db.env
redis:
image: redis:6
container_name: redis
celery:
build:
context: .
dockerfile: gcartapp/gcartapp.dockerfile
volumes:
- ./gcartapp:/gcartapp
container_name: cl01
command: celery -A core worker -l info
links:
- redis
networks:
default:
external:
name: box-net