Skip to content

Commit cc55e4e

Browse files
committed
fix: 1. fixed Dockerfile
1 parent c0aca02 commit cc55e4e

File tree

2 files changed

+6
-13
lines changed

2 files changed

+6
-13
lines changed

.github/workflows/_node-ci.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,6 @@ on:
2323
default: dev
2424
type: string
2525

26-
secrets:
27-
npm_token:
28-
description: NPM token
29-
required: true
30-
3126
jobs:
3227
build-image:
3328
name: Build Image
@@ -70,8 +65,3 @@ jobs:
7065
tags: ${{ steps.meta.outputs.tags }}
7166
cache-from: type=gha
7267
cache-to: type=gha,mode=max
73-
build-args: |
74-
VERSION=${{ inputs.release_version }}
75-
COMMIT_ID=${{ github.sha }}
76-
secrets: |
77-
NPM_TOKEN=${{ secrets.npm_token }}

Dockerfile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,14 @@ WORKDIR /app
4343

4444
# Copy only the production dependencies
4545
COPY --from=build /app/dist /app/dist
46-
COPY --from=build /app/package.json /app/package.json
47-
COPY --from=build /app/package-lock.json /app/package-lock.json
46+
COPY --from=build /app/node_modules /app/node_modules
4847

4948
# Set environment variables
5049
ENV NODE_ENV=production
5150

51+
# Set port
52+
ARG PORT=4242
53+
ENV PORT=${PORT}
54+
5255
# Default command for production
53-
CMD ["/nodejs/bin/node", "/app/dist/app.js"]
56+
CMD ["dist/app.js"]

0 commit comments

Comments
 (0)