Skip to content

Commit 30ed897

Browse files
Merge pull request #19 from wanteddev/throttling-and-registry
Improving Dockerfile caching
2 parents 0405995 + 9b4bcc4 commit 30ed897

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

.dockerignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules
2+
architecture.svg
3+
ecosystem.config.js

.github/workflows/push.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ jobs:
99
name: Build Lighthouse Image
1010
runs-on: ubuntu-18.04
1111

12-
strategy:
13-
matrix:
14-
node-version: [15.x]
15-
1612
steps:
1713
- uses: actions/checkout@v2
1814
with:

Dockerfile

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,14 @@ RUN apt-get update \
1313
&& wget --quiet https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh -O /usr/sbin/wait-for-it.sh \
1414
&& chmod +x /usr/sbin/wait-for-it.sh
1515

16-
COPY . /home/app
1716
WORKDIR /home/app
1817

19-
RUN npm install
20-
RUN npm install -g pm2
18+
COPY ./package.json /home/app/package.json
19+
COPY ./yarn.lock /home/app/yarn.lock
20+
21+
RUN yarn --frozen-lockfile
22+
RUN yarn global add pm2
23+
24+
COPY . /home/app
25+
2126
CMD [ "node", "src/index.js" ]

0 commit comments

Comments
 (0)