-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yaml
88 lines (80 loc) · 2.24 KB
/
docker-compose.yaml
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
version: '3.4'
x-common-variables: &common-variables
CELERY_BROKER_URL: redis://redis:6379
CELERY_RESULT_BACKEND: redis://redis:6379
MYSQL_HOST: mysql
MYSQL_ROOT_PASSWORD: mysql123
MYSQL_USER: mysql
MYSQL_PASSWORD: mysql123
MYSQL_DATABASE: hseling-cat-and-kittens
HSELING_RPC_ENDPOINT: http://hse-api-web:80/rpc/
HSELING_API_ENDPOINT: http://hse-api-web:80/api/
RESTRICTED_MODE: 0
services:
hse-api-web:
build:
context: .
dockerfile: hseling-api-cat-and-kittens/Dockerfile
ports:
- "5000:80"
volumes:
- type: bind
source: ./hseling-api-cat-and-kittens/hseling_api_cat_and_kittens
target: /app/hseling_api_cat_and_kittens
- type: bind
source: ./hseling-data-cat-and-kittens/api
target: /data
depends_on:
- mysql
- redis
- hse-api-celery
environment: *common-variables
hse-api-celery:
build:
context: .
dockerfile: hseling-api-cat-and-kittens/Dockerfile
command: celery -A main.celery worker
volumes:
- type: bind
source: ./hseling-api-cat-and-kittens/hseling_api_cat_and_kittens
target: /app/hseling_api_cat_and_kittens
- type: bind
source: ./hseling-data-cat-and-kittens/api
target: /data
depends_on:
- mysql
- redis
environment: *common-variables
mysql:
image: mysql
ports:
- "13306:3306"
command: --default-authentication-plugin=mysql_native_password
restart: always
environment: *common-variables
volumes:
- type: bind
source: ./hseling-data-cat-and-kittens/mysql
target: /var/lib/mysql
redis:
image: redis:latest
hse-web-web:
build:
context: .
dockerfile: hseling-web-cat-and-kittens/Dockerfile
ports:
- "8000:80"
depends_on:
- hse-api-web
- hse-api-celery
environment: *common-variables
volumes:
- type: bind
source: ./hseling-web-cat-and-kittens/hseling_web_cat_and_kittens
target: /app/hseling_web_cat_and_kittens
- type: bind
source: ./hseling-web-cat-and-kittens/hseling_web_cat_and_kittens/static
target: /app/static
- type: bind
source: ./hseling-data-cat-and-kittens/web
target: /data