-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
46 lines (42 loc) · 1016 Bytes
/
docker-compose.yml
File metadata and controls
46 lines (42 loc) · 1016 Bytes
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
services:
sqldb:
image: mysql:8.0.33
container_name: sqldb-container
command: --default-authentication-plugin=mysql_native_password
restart: unless-stopped
volumes:
- ./src/db/init.sql:/docker-entrypoint-initdb.d/0_init.sql
- sqldb_data:/var/lib/mysql
ports:
- ${DB_EXTERNAL_PORT}:${DB_INTERNAL_PORT}
environment:
MYSQL_DATABASE: ${DB_NAME}
MYSQL_USER: ${DB_USER}
MYSQL_PASSWORD: ${DB_PASSWORD}
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
SERVICE_TAGS: ${NODE_ENV}
SERVICE_NAME: sqldb
networks:
- internalnet
node-server:
container_name: node-server-container
tty: true
stdin_open: true
build: .
volumes:
- .:/usr/code
- node_api_volume:/var/lib/node_server
ports:
- ${SERVER_PORT}:${SERVER_PORT}
expose:
- ${SERVER_PORT}
depends_on:
- sqldb
networks:
- internalnet
networks:
internalnet:
driver: bridge
volumes:
sqldb_data:
node_api_volume: