Skip to content

Commit a8d8cdf

Browse files
committed
Fix GitHub Actions deployment: Update npm ci command and improve .dockerignore
- Remove deprecated --only=production flag from npm ci - Add fallback to npm install if npm ci fails - Improve .dockerignore to exclude node_modules and build artifacts - Add npm cache cleaning for more reliable builds
1 parent 195e3c1 commit a8d8cdf

2 files changed

Lines changed: 35 additions & 2 deletions

File tree

.dockerignore

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,16 @@ var/
2828
venv/
2929
ENV/
3030

31+
# Node.js files
32+
node_modules/
33+
frontend/node_modules/
34+
npm-debug.log*
35+
yarn-debug.log*
36+
yarn-error.log*
37+
frontend/build/
38+
.npm
39+
.yarn
40+
3141
# IDE files
3242
.idea/
3343
.vscode/
@@ -36,11 +46,26 @@ ENV/
3646

3747
# Logs
3848
*.log
49+
logs/
3950

4051
# Local configuration
4152
.env
4253
.env.local
54+
.env.development.local
55+
.env.test.local
56+
.env.production.local
4357

4458
# Temp files
4559
.DS_Store
46-
Thumbs.db
60+
Thumbs.db
61+
*.tmp
62+
*.temp
63+
64+
# Documentation
65+
README.md
66+
DEPLOYMENT.md
67+
*.md
68+
69+
# Docker files
70+
Dockerfile*
71+
docker-compose*

Dockerfile

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,18 @@
22
FROM node:18-alpine AS frontend-builder
33

44
WORKDIR /app/frontend
5+
6+
# Copy package files
57
COPY frontend/package*.json ./
6-
RUN npm ci
78

9+
# Clear npm cache and install dependencies
10+
RUN npm cache clean --force && \
11+
(npm ci --no-audit --no-fund || npm install --no-audit --no-fund)
12+
13+
# Copy frontend source code
814
COPY frontend/ ./
15+
16+
# Build the frontend
917
RUN npm run build
1018

1119
# Python backend stage

0 commit comments

Comments
 (0)