-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
135 lines (126 loc) · 3.55 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
version: '3.4'
services:
stock-crawler:
container_name: stock-crawler
hostname: stock-crawler
image: juliocesarmidia/stock-crawler:latest
build:
context: ./stock-crawler
environment:
MONGO_URI: mongodb://${MONGO_INITDB_ROOT_USERNAME}:${MONGO_INITDB_ROOT_PASSWORD}@mongo:27017
MONGO_DATABASE: ${MONGO_DATABASE}
RABBITMQ_URI: amqp://${RABBITMQ_USERNAME}:${RABBITMQ_PASSWORD}@rabbitmq/?heartbeat=30
RABBITMQ_QUEUE: ${RABBITMQ_QUEUE}
networks:
- subnet_0
restart: on-failure
stock-api:
container_name: stock-api
hostname: stock-api
image: juliocesarmidia/stock-api:latest
build:
context: ./stock-api
ports:
- 5050:5050
environment:
MONGO_URI: mongodb://${MONGO_INITDB_ROOT_USERNAME}:${MONGO_INITDB_ROOT_PASSWORD}@mongo:27017
MONGO_DATABASE: ${MONGO_DATABASE}
RABBITMQ_URI: amqp://${RABBITMQ_USERNAME}:${RABBITMQ_PASSWORD}@rabbitmq/?heartbeat=30
RABBITMQ_EXCHANGE: ${RABBITMQ_EXCHANGE}
RABBITMQ_ROUTING_KEY: ${RABBITMQ_ROUTING_KEY}
AWS_XRAY_DAEMON_ADDRESS: xray-daemon:2000
PYTHONDONTWRITEBYTECODE: 1
PYTHONUNBUFFERED: 1
FLASK_ENV: development
FLASK_APP: /usr/src/app/stock/entrypoint/flask_app.py
FLASK_DEBUG: 0
entrypoint:
- flask
- run
- --host=0.0.0.0
- --port=5050
networks:
- subnet_0
restart: on-failure
volumes:
- ./stock-api/src:/usr/src/app:rw
stock-ui:
container_name: stock-ui
hostname: stock-ui
image: juliocesarmidia/stock-ui:latest
build:
context: ./stock-ui
dockerfile: Development.Dockerfile
ports:
- 8080:8080
environment:
NODE_ENV: development
VUE_APP_API_URI: http://stock-api:5050
networks:
- subnet_0
restart: on-failure
volumes:
- ./stock-ui:/app:rw
- stock-ui-node-modules:/app/node_modules:rw
mongo:
container_name: mongo
hostname: mongo
image: mongo:5.0
command: mongod --config /etc/mongo/mongod.conf --storageEngine wiredTiger
ports:
- 28017:27017
environment:
MONGO_INITDB_DATABASE: ${MONGO_DATABASE}
MONGO_INITDB_ROOT_USERNAME: ${MONGO_INITDB_ROOT_USERNAME}
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_INITDB_ROOT_PASSWORD}
networks:
- subnet_0
restart: on-failure
volumes:
- mongo-data:/data/db:rw
- mongo-home:/home/mongodb:rw
- ./mongo/mongod.conf:/etc/mongo/mongod.conf:ro
- ./mongo/init.sh:/docker-entrypoint-initdb.d/init.sh:ro
- ./mongo/init.js:/init.js:ro
rabbitmq:
container_name: rabbitmq
hostname: rabbitmq
image: juliocesarmidia/rabbitmq:latest
build:
context: ./rabbitmq
ports:
- 5872:5672
- 15872:15672
environment:
RABBITMQ_USERNAME: ${RABBITMQ_USERNAME}
RABBITMQ_PASSWORD: ${RABBITMQ_PASSWORD}
RABBITMQ_QUEUE: ${RABBITMQ_QUEUE}
RABBITMQ_EXCHANGE: ${RABBITMQ_EXCHANGE}
RABBITMQ_ROUTING_KEY: ${RABBITMQ_ROUTING_KEY}
networks:
- subnet_0
restart: on-failure
xray-daemon:
container_name: xray-daemon
hostname: xray-daemon
image: juliocesarmidia/xray-daemon:latest
build:
context: ./xray-daemon
ports:
- 2000:2000/tcp
- 2000:2000/udp
environment:
AWS_REGION: ${AWS_REGION}
AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID}
AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY}
networks:
- subnet_0
restart: on-failure
networks:
subnet_0:
driver: bridge
volumes:
mongo-data: {}
mongo-home: {}
stock-ui-node-modules: {}
secrets: {}