Skip to content

Commit 3600331

Browse files
committed
🔥 add docker yaml
1 parent 2499cde commit 3600331

File tree

2 files changed

+20
-3
lines changed

2 files changed

+20
-3
lines changed

.github/workflows/docker-image.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Docker Image CI
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
branches: [ "master" ]
8+
9+
jobs:
10+
11+
build:
12+
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v3
17+
- name: Build the Docker image
18+
run: docker build . --file Dockerfile --tag vue-ssr-template:$(date +%s)

Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@ FROM node:16 as base
33
FROM base as builder
44
WORKDIR /home/app
55
COPY . ./
6-
RUN npm install pnpm -g
7-
RUN pnpm install && pnpm builder
6+
RUN npm install
87

98
FROM builder as runner
10-
RUN pnpm i -g pm2
9+
RUN npm i -g pm2
1110
RUN pm2 install pm2-logrotate
1211

1312
CMD ["pm2-logrotate", "start", "app.config.json", "--env", "prod"]

0 commit comments

Comments
 (0)