-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
53 lines (50 loc) · 1.31 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
version: "3.5"
services:
mysql:
image: mysql
build: ./mysql
ports:
- 3306:3306
restart: always
hostname: mysql
environment:
MYSQL_ROOT_USERNAME: ${MYSQL_ROOT_USERNAME}
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
container_name: mysql-banking
volumes:
- ${DATA_DIR}/mysql:/var/lib/mysql
command: --sql_mode=""
auth-banking-service:
build:
context: ./
dockerfile: auth-banking/Dockerfile
ports:
- 3001:3001
container_name: auth-banking-service
depends_on:
- mysql
environment:
MYSQL_HOST: "mysql:3306"
MYSQL_PORT: 3306
MYSQL_ROOT_USERNAME: ${MYSQL_ROOT_USERNAME}
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DB_NAME: ${MYSQL_DB_NAME}
SERVER_ADDRESS: ${SERVER_ADDRESS}
SERVER_PORT_AUTH: ${SERVER_PORT_AUTH}
banking-service:
build:
context: ./
dockerfile: banking/Dockerfile
ports:
- 3000:3000
container_name: banking-service
depends_on:
- auth-banking-service
environment:
MYSQL_HOST: "mysql:3306"
MYSQL_PORT: 3306
MYSQL_ROOT_USERNAME: ${MYSQL_ROOT_USERNAME}
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DB_NAME: ${MYSQL_DB_NAME}
SERVER_ADDRESS: ${SERVER_ADDRESS}
SERVER_PORT: ${SERVER_PORT}