Skip to content

Commit

Permalink
Docker/init (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhanghengxin authored Apr 18, 2024
1 parent ff672d0 commit 1866315
Show file tree
Hide file tree
Showing 4 changed files with 2,925 additions and 107 deletions.
14 changes: 14 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM node:18

RUN npm install -g hexo-cli
WORKDIR /app

COPY . /app

RUN yarn
RUN yarn build

EXPOSE 4000

CMD ["hexo", "server"]

6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Install Hexo

``` bash
$ npm install -g hexo-cli
$ yarn global add open-cli
```

Install dependencies:
Expand All @@ -33,6 +34,11 @@ Run server:
$ hexo server
```

Run editor
``` bash
$ yarn start
```

Create a new page:

``` bash
Expand Down
10 changes: 7 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,19 @@
"version": "0.0.0",
"private": true,
"hexo": {
"version": "6.3.0"
"version": "7.2.0"
},
"scripts": {
"start": "hexo server & yarn open",
"open": "open-cli http://localhost:4000/admin",
"build": "hexo generate",
"eslint": "eslint .",
"prepare": "husky install"
},
"dependencies": {
"cheerio": "^0.22.0",
"hexo": "hexojs/hexo",
"hexo": "^7.2.0",
"hexo-admin": "^2.3.0",
"hexo-asset-image-for-hexo5": "^2.1.7",
"hexo-clean-css": "^2.0.0",
"hexo-filter-nofollow": "^2.0.2",
Expand All @@ -36,7 +39,8 @@
"hexo-browsersync": "^0.3.0",
"husky": "^8.0.1",
"imagemin-lint-staged": "^0.5.1",
"lint-staged": "^13.0.3"
"lint-staged": "^13.0.3",
"open-cli": "^8.0.0"
},
"lint-staged": {
"*.{png,jpeg,jpg,gif,svg}": [
Expand Down
Loading

0 comments on commit 1866315

Please sign in to comment.