-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
38 lines (35 loc) · 876 Bytes
/
docker-compose.yml
File metadata and controls
38 lines (35 loc) · 876 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
version: "3"
services:
mysql: # mysql
build: ./mysql
image: srect/todolist_mysql:latest
container_name: todolist_mysql_server
restart: always
# MYSQL_ROOT_PASSWORD: "123456"
node: # nodejs服务
depends_on:
- 'mysql'
build: . # Dockerfile所在目录构建
image: srect/koa:latest
container_name: koa_server
# ports:
# - "8001:4000"
restart: always # 自动重启
environment:
- NODE_ENV=production
command: npm run server # 覆盖容器启动后默认执行的命令
vue:
depends_on: # vue 容器会保证在 node容器之后启动
- 'node'
build: ./web
image: srect/vite_vue3_pinia:latest
container_name: vite_vue3_pinia
restart: always
environment:
- NODE_ENV=production
ports:
- "8001:80"
networks:
default:
external:
name: vue-koa