Skip to content

Commit 54578b1

Browse files
gilberthclaude
andcommitted
feat: finalize Docker deployment with sharp fix and configuration updates
- Fix sharp module installation for Alpine Linux in Dockerfile - Update Docker compose test configuration - Update frontend TypeScript config for compatibility 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 9502764 commit 54578b1

File tree

3 files changed

+23
-27
lines changed

3 files changed

+23
-27
lines changed

Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
FROM node:22-alpine AS frontend-dependencies
33
WORKDIR /opt/app
44
COPY frontend/package.json frontend/package-lock.json ./
5-
RUN npm ci
5+
RUN npm ci --legacy-peer-deps
66

77
# Stage 2: Build frontend
88
FROM node:22-alpine AS frontend-builder
@@ -20,7 +20,7 @@ FROM node:22-alpine AS backend-dependencies
2020
RUN apk add --no-cache python3
2121
WORKDIR /opt/app
2222
COPY backend/package.json backend/package-lock.json ./
23-
RUN npm ci
23+
RUN npm ci --legacy-peer-deps
2424

2525
# Stage 4: Build backend
2626
FROM node:22-alpine AS backend-builder
@@ -31,6 +31,7 @@ COPY ./backend .
3131
COPY --from=backend-dependencies /opt/app/node_modules ./node_modules
3232
RUN npx prisma generate
3333
RUN npm run build && npm prune --production
34+
RUN npm install --os=linux --libc=musl --cpu=x64 sharp
3435

3536
# Stage 5: Final image
3637
FROM node:22-alpine AS runner

docker-compose.test.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
services:
22
gytech-test:
33
image: ghcr.io/gilberth/gytech-cloud:latest
4-
container_name: gytech-test
4+
container_name: gytech-test-updated
55
restart: unless-stopped
66
ports:
7-
- "3002:3000"
7+
- "3003:3000" # Use different port
88
environment:
99
- TRUST_PROXY=false
1010
volumes:
11-
- gytech-test-data:/opt/app/backend/data
12-
- gytech-test-images:/opt/app/frontend/public/img
11+
- gytech-test-data-new:/opt/app/backend/data
12+
- gytech-test-images-new:/opt/app/frontend/public/img
1313
healthcheck:
1414
test: ["CMD", "sh", "-c", "curl -fs http://localhost:3000/api/health || exit 1"]
1515
interval: 30s
@@ -18,7 +18,7 @@ services:
1818
start_period: 60s
1919

2020
volumes:
21-
gytech-test-data:
21+
gytech-test-data-new:
2222
driver: local
23-
gytech-test-images:
23+
gytech-test-images-new:
2424
driver: local

frontend/tsconfig.json

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,27 @@
11
{
22
"compilerOptions": {
33
"target": "es5",
4-
"lib": [
5-
"dom",
6-
"dom.iterable",
7-
"esnext"
8-
],
4+
"lib": ["dom", "dom.iterable", "es6"],
95
"allowJs": true,
106
"skipLibCheck": true,
117
"strict": true,
12-
"forceConsistentCasingInFileNames": true,
138
"noEmit": true,
149
"esModuleInterop": true,
1510
"module": "esnext",
16-
"moduleResolution": "node",
11+
"moduleResolution": "bundler",
1712
"resolveJsonModule": true,
1813
"isolatedModules": true,
1914
"jsx": "preserve",
20-
"incremental": true
15+
"incremental": true,
16+
"plugins": [
17+
{
18+
"name": "next"
19+
}
20+
],
21+
"paths": {
22+
"@/*": ["./src/*"]
23+
}
2124
},
22-
"include": [
23-
"next-env.d.ts",
24-
"**/*.ts",
25-
"**/*.tsx",
26-
"functions/finishShare/src/index.js",
27-
"functions/createShare/src/index.js"
28-
],
29-
"exclude": [
30-
"node_modules"
31-
]
32-
}
25+
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
26+
"exclude": ["node_modules"]
27+
}

0 commit comments

Comments
 (0)