docker 前端部署
docker run -d -p 80:80 --name todolist-client -v /root/nginx/www:/usr/share/nginx/html -v /root/nginx/conf/nginx.conf:/etc/nginx/nginx.conf -v /root/nginx/logs:/var/log/nginx ad4c705f24d3
docker 后端部署
docker Compose 部署
创建如下Dockerfile
# 引用镜像
FROM node:8.9.4-alpine
MAINTAINER yuriy
RUN mkdir -p /opt/service
WORKDIR /opt/service
# 将dist拷贝到执行目录
COPY . /opt/service
# 安装依赖即构建应用
RUN npm install
# 配置环境变量
ENV HOST 0.0.0.0
ENV PORT 9000
# 定义程序默认端口
EXPOSE 9000
# 运行程序命令
CMD node ./src/app.js
搭建gitlab -> jenkins -> docker 自动发布体系
https://blog.csdn.net/qq_25407771/article/details/88377359
- gitlab搭建 https://www.cnblogs.com/zuxing/articles/9329152.html
- jenkins搭建