https://github.com/xerrors/meco
a blog site powered by vuepress-v2
https://github.com/xerrors/meco
antd-vue blog-theme vue vuepress vuepress-blog
Last synced: 2 months ago
JSON representation
a blog site powered by vuepress-v2
- Host: GitHub
- URL: https://github.com/xerrors/meco
- Owner: xerrors
- License: mit
- Created: 2021-04-02T10:29:03.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-03-07T06:03:28.000Z (over 3 years ago)
- Last Synced: 2025-04-03T14:21:32.164Z (3 months ago)
- Topics: antd-vue, blog-theme, vue, vuepress, vuepress-blog
- Language: Shell
- Homepage: https://www.xerrors.fun
- Size: 1.04 MB
- Stars: 8
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Meco

一个基于 vuepress v2 的默认主题开发的博客网站;
- 易自定义;
- 魔改程度低,便于升级;
- 使用 AntD for vue2
- 可以使用后台管理系统对数据进行管理,见[Meco-MS](https://github.com/Xerrors/Meco-MS/)
- 可以使用基于 flask 的后端脚本来处理后台管理系统,见[Meco-Server](https://github.com/Xerrors/Meco-Server/)预览:[站点](https://www.xerrors.fun)

> 提醒:
> 此博客服务需要配合后台管理系统[Meco-MS by Vue3](https://github.com/Xerrors/Meco-MS/)和后台数据服务[Meco-Server by Flask](https://github.com/Xerrors/Meco-Server/)才能正常使用,否则部分页面是加载不出来数据的(如博客页面、动态页面),文章页面可以正常显示;而后台管理系统和后台数据服务器的部署需要一定的门槛,请酌情使用。## Docker 部署
使用 docker 可以方便的在服务器上部署,首先 clone 此项目:
```sh
git clone https://github.com/Xerrors/Meco.gitcd Meco
```### 1. 直接部署
首先此项目的目录下面创建一个 Dockerfile,内容如下。
```dockerfile
# build stage
FROM node:lts-alpine as build-stage
WORKDIR /appCOPY package.json ./
RUN yarnCOPY . .
RUN yarn docs:build# production stage
FROM nginx:stable-alpine as production-stage
COPY --from=build-stage /app/docs/.vuepress/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
```然后 build 一个镜像,并启动这个镜像:
```sh
docker build --tag vuepress-docker .docker run -d -p 80:80 --rm vuepress-docker --name meco
```此时使用 http://127.0.0.1 就可以在本地访问到,如果是在服务器上面,使用服务器的 IP 地址即可。
### 2. 主机编译,然后部署到 docker
首先要确保主机已经有了 node (version>=12) 环境,然后创建一个 Dockerfile,内容如下:
```dockerfile
FROM nginx
MAINTAINER XerrorsCOPY docs/.vuepress/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
```之后就可以直接运行部署的脚本就可以了:
```sh
bash deploy.sh
```当然也可以手动编译并运行 docker,首先
```sh
docker build --tag vue-deploy .docker run -d -p 80:80 --rm --name meco vue-deploy
```