-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose-dev-node.yml
49 lines (46 loc) · 1.19 KB
/
docker-compose-dev-node.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
name: ${APP_CONTAINER_NAME}-container-dev
services:
node-server:
environment:
- NODE_ENV=dev
- PORT=${PORT}
- APP_CONTAINER_NAME=${APP_CONTAINER_NAME}
restart: unless-stopped
networks:
- main_network
build:
context: .
dockerfile: Dockerfile.dev
args:
NODE_VERSION: ${NODE_VERSION}
PORT: ${PORT}
volumes:
- .:/usr/src/app
- /usr/src/app/node_modules
container_name: ${APP_CONTAINER_NAME}-Development
expose:
- ${PORT}
ports:
- "${PORT}:${PORT}"
command: npm run dev
mysql:
image: mysql:8.0
container_name: server-mysql
restart: unless-stopped
networks:
- main_network
environment:
MYSQL_ROOT_PASSWORD: root_password # Root password
MYSQL_DATABASE: main_data # Default database
MYSQL_USER: main_user # Non-root user
MYSQL_PASSWORD: user_password # Non-root user password
volumes:
- mysql_data:/var/lib/mysql # Mounting persistent volume for data storage
ports:
- "3959:3306" # Expose port 3306 for MySQL
networks:
main_network:
driver: bridge
volumes:
mysql_data:
driver: local # Use local storage for persistent data