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
|
## v0.0.1.20240905_base
|
||||||
|
|
||||||
### ⭐️Features
|
### ⭐️Features
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
FROM docker.io/library/node:20.17.0-alpine3.19
|
FROM node:20.17.0-alpine3.19
|
||||||
|
|
||||||
WORKDIR /env
|
WORKDIR /env
|
||||||
COPY package.json ./
|
COPY package.json ./
|
||||||
RUN npm config set registry https://registry.npmmirror.com &&\
|
RUN npm config set registry https://registry.npmmirror.com &&\
|
||||||
npm install
|
npm install &&\
|
||||||
|
npm cache clean --force
|
||||||
|
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
@ -4,4 +4,9 @@ First, run the development server:
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker compose up
|
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:
|
services:
|
||||||
server:
|
server:
|
||||||
build: ./
|
build: ./
|
||||||
container_name: sccs_loca_server
|
container_name: sems_on_device_server
|
||||||
ports:
|
ports:
|
||||||
- 3000:3000
|
- 3000:3000
|
||||||
volumes:
|
volumes:
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "nodemon",
|
"dev": "nodemon",
|
||||||
"build": "next build",
|
"build": "next build",
|
||||||
"start": "NODE_ENV=production node server.js",
|
"start": "NODE_ENV=production node server.js",
|
||||||
"lint": "next lint"
|
"lint": "next lint"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
Loading…
Reference in New Issue
Block a user