File tree 3 files changed +101
-0
lines changed
3 files changed +101
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Version control
2
+ .git
3
+ .gitignore
4
+
5
+ # Node.js
6
+ node_modules
7
+ npm-debug.log
8
+
9
+ # Build artifacts
10
+ client /dist
11
+ client /build
12
+ server /dist
13
+ server /build
14
+
15
+ # Environment variables
16
+ .env
17
+ .env.local
18
+ .env.development
19
+ .env.test
20
+ .env.production
21
+
22
+ # Editor files
23
+ .vscode
24
+ .idea
25
+
26
+ # Logs
27
+ logs
28
+ * .log
29
+
30
+ # Testing
31
+ coverage
32
+
33
+ # Docker
34
+ Dockerfile
35
+ .dockerignore
Original file line number Diff line number Diff line change 60
60
- run : npm run publish-all
61
61
env :
62
62
NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
63
+
64
+ publish-github-container-registry :
65
+ runs-on : ubuntu-latest
66
+ if : github.event_name == 'release'
67
+ environment : release
68
+ needs : build
69
+ permissions :
70
+ contents : write
71
+ id-token : write
72
+ steps :
73
+ - uses : actions/checkout@v4
74
+
75
+ - name : Log in to the Container registry
76
+ uses : docker/login-action@v3
77
+ with :
78
+ registry : ghcr.io
79
+ username : ${{ github.actor }}
80
+ password : ${{ secrets.GITHUB_TOKEN }}
81
+
82
+ - name : Extract metadata (tags, labels) for Docker
83
+ id : meta
84
+ uses : docker/metadata-action@v5
85
+ with :
86
+ images : ghcr.io/${{ github.repository }}
87
+
88
+ - name : Build and push Docker image
89
+ id : push
90
+ uses : docker/build-push-action@v6
91
+ with :
92
+ context : .
93
+ push : true
94
+ tags : ${{ steps.meta.outputs.tags }}
95
+ labels : ${{ steps.meta.outputs.labels }}
96
+
97
+ - name : Generate artifact attestation
98
+ uses : actions/attest-build-provenance@v2
99
+ with :
100
+ subject-name : ghcr.io/${{ github.repository }}
101
+ subject-digest : ${{ steps.push.outputs.digest }}
102
+ push-to-registry : true
Original file line number Diff line number Diff line change
1
+ FROM node:22-slim
2
+
3
+ # Set working directory
4
+ WORKDIR /app
5
+
6
+ # Copy files
7
+ COPY . .
8
+
9
+ # Install dependencies
10
+ # Working around https://github.com/npm/cli/issues/4828
11
+ # RUN npm ci
12
+ RUN npm install --no-package-lock
13
+
14
+ # Build the application
15
+ RUN npm run build
16
+
17
+ ENV CLIENT_PORT=6274
18
+ ENV SERVER_PORT=6277
19
+
20
+ # Expose the CLIENT_PORT and SERVER_PORT
21
+ EXPOSE $CLIENT_PORT
22
+ EXPOSE $SERVER_PORT
23
+
24
+ # Use ENTRYPOINT with CMD for arguments
25
+ ENTRYPOINT ["npm" , "start" ]
26
+ CMD []
You can’t perform that action at this time.
0 commit comments