-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
59 lines (55 loc) · 1.46 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
version: '3.6'
services:
api:
build: .
image: businesses-api
restart: always
ports:
- 8000:8000
environment:
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
MYSQL_HOST: mysql
MYSQL_PORT: 3306
MONGO_DATABASE: ${MONGO_DATABASE}
MONGO_USERNAME: ${MONGO_USERNAME}
MONGO_PASSWORD: ${MONGO_PASSWORD}
MONGO_HOST: mongo
MONGO_PORT: 27017
REDIS_HOST: ${REDIS_HOST}
REDIS_PORT: ${REDIS_PORT}
mysql:
image: mysql:5
restart: always
volumes:
- mysql-data:/var/lib/mysql
- ./db-init/:/docker-entrypoint-initdb.d
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
mongo:
image: mongo:latest
restart: always
volumes:
- mongo-data:/data/db
- ./db-init/:/docker-entrypoint-initdb.d
environment:
MONGO_INITDB_ROOT_USERNAME: ${MONGO_USERNAME}
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_PASSWORD}
MONGO_INITDB_DATABASE: ${MONGO_DATABASE}
redis:
image: redis
ports:
- 6379:6379
hostname: ${REDIS_HOST}
environment:
REDIS_HOST: ${REDIS_HOST}
REDIS_PORT: ${REDIS_PORT}
volumes:
mysql-data:
name: businesses-mysql-data
mongo-data:
name: business-mongo-data