-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
executable file
·51 lines (49 loc) · 1.09 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
services:
mysqldb:
image: mysql:8.0
container_name: mysqlcontainer
command: --default-authentication-plugin=mysql_native_password
restart: unless-stopped
volumes:
- ./database/init.sql:/docker-entrypoint-initdb.d/0_init.sql
- $HOME/database:/var/lib/mysql
ports:
- 3306:3306
expose:
- 3306
environment:
MYSQL_DATABASE: patientsdb
MYSQL_USER: admin
MYSQL_PASSWORD: password
MYSQL_ROOT_PASSWORD: password
SERVICE_TAGS: prod
SERVICE_NAME: mysqldb
networks:
- internalnet
nodeapp:
container_name: nodeappcontainer
build: .
image: nodeapp:v1
volumes:
- $HOME/nodeapp:/code
ports:
- 3000:3000
expose:
- 3000
environment:
DB_HOST: mysqldb
DB_PORT: 3306
DB_USER: 'admin'
DB_PASSWORD: 'password'
DB_NAME: patientsdb
DB_CONNECTION_LIMIT: 20
SERVICE_TAGS: prod
SERVICE_NAME: nodeappservice
SERVICE_PORT: 3000
depends_on:
- mysqldb
networks:
- internalnet
networks:
internalnet:
driver: bridge