build scheme
This commit is contained in:
parent
8bc281423e
commit
6d3b3435fe
@ -1,5 +1,11 @@
|
||||
# 更新日志
|
||||
|
||||
## v0.0.1.20240912_base
|
||||
|
||||
### ⭐️Features
|
||||
- 研究部署方案,最终采用开发环境编译,然后脚本打包,然后使用同一个docker环境部署的方案。(详见README.md)
|
||||
|
||||
|
||||
## v0.0.1.20240905_base
|
||||
|
||||
### ⭐️Features
|
||||
|
@ -1,10 +1,10 @@
|
||||
FROM docker.io/library/node:20.17.0-alpine3.19
|
||||
FROM node:20.17.0-alpine3.19
|
||||
|
||||
WORKDIR /env
|
||||
COPY package.json ./
|
||||
RUN npm config set registry https://registry.npmmirror.com &&\
|
||||
npm install
|
||||
|
||||
npm install &&\
|
||||
npm cache clean --force
|
||||
|
||||
|
||||
WORKDIR /app
|
||||
|
@ -4,4 +4,9 @@ First, run the development server:
|
||||
|
||||
```bash
|
||||
docker compose up
|
||||
```
|
||||
```
|
||||
|
||||
发布:
|
||||
1. 在docker环境内编译,npm run build
|
||||
2. 打包,Compress-Archive -Path .next/standalone/*,.next/static -DestinationPath ./release/tmp.zip
|
||||
3. 运行 docker run -p 4000:3000 -v C:\SEMS-development\SEMS-on-device-server\release:/app sems-on-device-server-server:latest sh -c 'ln -snf /env/node_modules /app && npm run start'
|
@ -1,7 +1,7 @@
|
||||
services:
|
||||
server:
|
||||
build: ./
|
||||
container_name: sccs_loca_server
|
||||
container_name: sems_on_device_server
|
||||
ports:
|
||||
- 3000:3000
|
||||
volumes:
|
||||
|
@ -6,7 +6,7 @@
|
||||
"scripts": {
|
||||
"dev": "nodemon",
|
||||
"build": "next build",
|
||||
"start": "NODE_ENV=production node server.js",
|
||||
"start": "NODE_ENV=production node server.js",
|
||||
"lint": "next lint"
|
||||
},
|
||||
"dependencies": {
|
||||
|
Loading…
Reference in New Issue
Block a user