Skip to content

Commit de3928c

Browse files
committed
Tidy up ci process
1 parent 73e1171 commit de3928c

File tree

9 files changed

+10945
-2116
lines changed

9 files changed

+10945
-2116
lines changed

.dockerignore

+5
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
1+
.dockerignore
2+
.git
3+
.gitignore
4+
Dockerfile
15
node_modules
6+
npm-debug.log

.github/workflows/ci.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ jobs:
1010
ci:
1111
runs-on: ubuntu-latest
1212
steps:
13+
- uses: styfle/[email protected]
14+
with:
15+
access_token: ${{ github.token }}
1316
- uses: actions/checkout@v3
1417
- uses: actions/setup-node@v3
1518
with:
16-
node-version: '14'
19+
node-version-file: '.nvmrc'
20+
check-latest: true
1721
- run: npm run docker:test

.nvmrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
16.14.2
1+
16.15.0

Dockerfile

+8-14
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,9 @@
1-
FROM node:17.8.0
2-
3-
RUN npm install -g npm@latest
4-
5-
RUN mkdir -p /usr/src/app
6-
WORKDIR /usr/src/app
7-
8-
COPY package.json package-lock.json ./
9-
RUN npm install
10-
11-
COPY . .
12-
1+
FROM node:16.15.0
2+
RUN mkdir -p /home/node/app/_coverage && chown -R node:node /home/node/app
3+
WORKDIR /home/node/app
4+
COPY --chown=node:node package*.json ./
5+
RUN npm ci
6+
COPY --chown=node:node . .
137
EXPOSE 3000
14-
15-
CMD [ "./bin/start.sh" ]
8+
USER node
9+
CMD [ "./bin/start.sh" ]

docker-compose.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,10 @@ services:
1414
- DB_USER=realworld
1515
- SECRET=secret
1616
volumes:
17-
- .:/usr/src/app
18-
- /usr/src/app/node_modules
17+
- .:/home/node/app
18+
- /home/node/app/node_modules
19+
- /home/node/app/_coverage
20+
1921
postgres:
2022
image: postgres:14.2
2123
environment:

0 commit comments

Comments
 (0)