Skip to content

Commit 1ed9a09

Browse files
committed
fix: dockerfile
1 parent 6424681 commit 1ed9a09

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

.github/buildkitd.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[worker.oci]
2+
max-parallelism = 4

Dockerfile

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
11
FROM node:lts-alpine
22

3+
ENV NODE_ENV=production
4+
35
EXPOSE 8000
46

57
WORKDIR /app
6-
COPY package.json yarn.lock index.js settings.js /app/
78

9+
# Install production dependencies using the frozen lockfile for reproducible builds
10+
COPY package.json yarn.lock ./
811
RUN set -ex; \
912
node --version; \
1013
yarn --version; \
11-
yarn --prod; \
14+
yarn install --production --frozen-lockfile --non-interactive; \
1215
yarn cache clean
1316

14-
COPY views /app/views
17+
# Copy application files
18+
COPY index.js settings.js ./
19+
COPY views ./views
1520

16-
CMD ["node", "/app/index"]
21+
CMD ["node", "index.js"]

0 commit comments

Comments
 (0)