Skip to content

Commit e175886

Browse files
committed
adding docker
1 parent 69f358b commit e175886

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

Dockerfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
FROM node:20-slim AS base
2+
3+
WORKDIR /usr/src/hexo
4+
5+
COPY package*.json ./
6+
7+
COPY . .
8+
9+
RUN npm run clean && npm run build
10+
11+
CMD ["npm", "test"]

docker-compose.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
version: '3.8'
2+
3+
services:
4+
hexo:
5+
build: .
6+
container_name: hexo-dev
7+
image: hexo-dev:latest
8+
volumes:
9+
- .:/usr/src/hexo
10+
working_dir: /usr/src/hexo
11+
command: npm test
12+
environment:
13+
- NODE_ENV=development
14+
tty: true

0 commit comments

Comments
 (0)