-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
76 lines (71 loc) · 2.13 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
71
72
73
74
75
76
version: '2.4'
services:
rospark_mysql:
build:
context: .
dockerfile: dockerfiles/rospark_mysql/Dockerfile
environment:
MYSQL_ROOT_PASSWORD: msu_team_password
MYSQL_DATABASE: db_rospark
MYSQL_USER: msu_team
MYSQL_PASSWORD: msu_team_password
expose:
- "3306"
volumes:
- ./docker_data/rospark_mysql:/var/lib/mysql:Z
command: --default-authentication-plugin=mysql_native_password
restart: always
networks:
- rospark_network
rospark_web:
build:
context: .
dockerfile: dockerfiles/rospark/Dockerfile
ports:
- "0.0.0.0:80:8080"
expose:
- "8080"
networks:
- rospark_network
depends_on:
- rospark_mysql
- rospark_redis
environment:
HOST: "0.0.0.0"
PORT: "8080"
MYSQL_ROSPARK_DB: "mysql://msu_team:msu_team_password@rospark_mysql:3306/db_rospark"
CELERY_REDIS: "redis://rospark_redis:6379"
TASKS_QUEUE: "rospark_async"
TASKS_PREFIX: "rospark_async"
WAIT_HOSTS: rospark_redis:6379, rospark_mysql:3306
WAIT_AFTER_HOSTS: 5
command: sh -c '/wait && uwsgi --http 0.0.0.0:8080 --mount /api/rospark=app_api:app --manage-script-name --processes 8 --master --enable-threads --lazy-apps -R 1000 --max-worker-lifetime 3600 --reload-on-rss 1024'
restart: always
rospark_worker_async:
build:
context: .
dockerfile: dockerfiles/rospark/Dockerfile
networks:
- rospark_network
depends_on:
- rospark_redis
- rospark_mysql
environment:
MYSQL_ROSPARK_DB: "mysql://msu_team:msu_team_password@rospark_mysql:3306/db_rospark"
CELERY_REDIS: "redis://rospark_redis:6379"
# TASKS_QUEUE: "rospark_async"
TASKS_PREFIX: "rospark_async"
WAIT_HOSTS: rospark_redis:6379, rospark_mysql:3306
WAIT_AFTER_HOSTS: 5
command: sh -c '/wait && celery -A app_worker worker --loglevel=info --pool=solo --concurrency=1 -Q rospark_async -O fair'
restart: always
rospark_redis:
image: redis
expose:
- "6379"
networks:
- rospark_network
restart: always
networks:
rospark_network:
# external: true