forked from globocom/GloboNetworkAPI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
83 lines (76 loc) · 1.97 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
77
78
79
80
81
82
83
version: '3'
services:
db:
container_name: netapi_db
image: mysql:8.0.0
ports:
- "3306:3306"
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: 1
volumes:
- netapi_db_vol:/var/lib/mysql
networks:
- netapi_net
queue:
container_name: netapi_queue
image: rabbitmq:3.6.9
ports:
- "5672:5672"
- "15672:15672"
command: sh -c "rabbitmq-plugins enable rabbitmq_management; rabbitmq-server"
volumes:
- ./scripts/docker/rabbitmq.config:/etc/rabbitmq/rabbitmq.config:ro
- ./scripts/docker/definitions.json:/etc/rabbitmq/definitions.json:ro
networks:
- netapi_net
cache:
container_name: netapi_cache
image: memcached:1.4.33
ports:
- "11211"
networks:
- netapi_net
celery:
container_name: netapi_celery
image: globocom/networkapi:latest
command: sh scripts/docker/docker-start-celery.sh
env_file:
- scripts/docker/netapi.env
volumes:
- .:/netapi
networks:
- netapi_net
links:
- db:netapi_db
- queue:netapi_queue
- cache:netapi_cache
depends_on:
- queue
netapi:
container_name: netapi_app
image: globocom/networkapi:latest
restart: always
ports:
- "127.0.0.1:8000:8000"
- "127.0.0.1:8001:8001"
env_file:
- scripts/docker/netapi.env
volumes:
- .:/netapi
networks:
- netapi_net
depends_on:
- db
- queue
- cache
links:
- db:netapi_db
external_links:
- netapi_graylog2
- cache:netapi_cache
- odl:netapi_odl
- queue:netapi_queue
volumes:
netapi_db_vol:
networks:
netapi_net: