chore: node 16

pull/21/merge
xiaojunnuo 2023-05-26 12:48:06 +08:00
parent db8043ecb6
commit ddf98ff593
3 changed files with 14 additions and 2 deletions

View File

@ -1,9 +1,11 @@
FROM registry.cn-shenzhen.aliyuncs.com/handsfree/node:16-alpine
RUN npm install -g cross-env --registry=https://registry.npmmirror.com
RUN npm install cross-env -g --registry=https://registry.npmmirror.com
RUN npm install pm2 -g --registry=https://registry.npmmirror.com
ADD ./workspace/certd-server/ /app/
WORKDIR /app/
ENV NODE_ENV production
RUN yarn install -P --registry=https://registry.npmmirror.com
CMD ["node","./bootstrap.js"]
CMD ["pm2-runtime", "start", "./bootstrap.js","--name", "certd","-i","1"]

7
docker/run/Dockerfile Normal file
View File

@ -0,0 +1,7 @@
FROM registry.cn-shenzhen.aliyuncs.com/handsfree/certd:latest
RUN npm install pm2 -g --registry=https://registry.npmmirror.com
CMD ["pm2-runtime", "start", "./bootstrap.js","--name", "certd","-i","1"]

View File

@ -1,6 +1,9 @@
version: '3.3' # 指定docker-compose 版本
services: # 要拉起的服务们
certd:
build:
context: ./
dockerfile: Dockerfile
image: registry.cn-shenzhen.aliyuncs.com/handsfree/certd:latest
container_name: certd # 容器名
restart: unless-stopped # 重启