-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
63 lines (59 loc) · 1.58 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
version: '3.7'
services:
api:
build: .
image: tarpaulin-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_USER: ${MONGO_USER}
MONGO_PASSWORD: ${MONGO_PASSWORD}
MONGO_HOST: mongodb
MONGO_PORT: 27017
REDIS_HOST: redis
REDIS_PORT: 6379
MAX_REQUESTS_PER_TIME_WINDOW: ${MAX_REQUESTS_PER_TIME_WINDOW}
TIME_WINDOW_MILLISEC: ${TIME_WINDOW_MILLISEC}
PAGINATION_PAGE_SIZE: ${PAGINATION_PAGE_SIZE}
LIMIT_REQUEST_RATE: ${LIMIT_REQUEST_RATE}
depends_on:
- mysql
- mongodb
- redis
mysql:
image: mysql:5
restart: always
volumes:
- mysql-data:/var/lib/mysql
- ./db-init/mysql:/docker-entrypoint-initdb.d
environment:
MYSQL_RANDOM_ROOT_PASSWORD: 'yes'
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
mongodb:
image: mongo:latest
restart: always
volumes:
- mongo-data:/data/db
- ./db-init/mongodb:/docker-entrypoint-initdb.d
environment:
MONGO_INITDB_ROOT_USERNAME: ${MONGO_ROOT_USER}
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_ROOT_PASSWORD}
MONGO_INITDB_DATABASE: ${MONGO_DATABASE}
MONGO_USER: ${MONGO_USER}
MONGO_PASSWORD: ${MONGO_PASSWORD}
redis:
image: redis:latest
restart: always
volumes:
mysql-data:
name: tarpaulin-mysql-data
mongo-data: