Fix luckychit Dockerfile for multi-stage build
This commit is contained in:
commit
9d280dd553
|
|
@ -19,8 +19,12 @@ JWT_SECRET=2559a382d606e4209085401d693ae25f
|
|||
JWT_EXPIRES_IN=24h
|
||||
|
||||
# CORS Configuration
|
||||
<<<<<<< HEAD
|
||||
ALLOWED_ORIGINS=http://localhost:8080,http://localhost:3000,https://chitfund.deepteklabs.com,http://chitfund.deepteklabs.com
|
||||
|
||||
=======
|
||||
ALLOWED_ORIGINS=https://chitfund.deepteklabs.com,http://chitfund.deepteklabs.com,http://localhost:8080,http://localhost:3000
|
||||
>>>>>>> main
|
||||
# Rate Limiting
|
||||
RATE_LIMIT_WINDOW_MS=900000
|
||||
RATE_LIMIT_MAX_REQUESTS=100
|
||||
|
|
|
|||
|
|
@ -1,17 +1,15 @@
|
|||
# Frontend Dockerfile for Chitfund (Flutter Web)
|
||||
FROM node:20-slim
|
||||
|
||||
FROM ghcr.io/cirruslabs/flutter:3.24.0 AS build
|
||||
WORKDIR /app
|
||||
|
||||
# We serve the build/web directory.
|
||||
# NOTE: This Dockerfile assumes you have already run 'flutter build web'
|
||||
# or we will use a multi-stage build if you prefer.
|
||||
# For simplicity in this home lab, we copy the build output.
|
||||
|
||||
COPY package*.json ./
|
||||
RUN npm install express
|
||||
|
||||
COPY . .
|
||||
RUN flutter pub get
|
||||
RUN flutter build web --release
|
||||
|
||||
FROM node:20-slim
|
||||
WORKDIR /app
|
||||
RUN npm init -y && npm install express
|
||||
COPY --from=build /app/build/web ./build/web
|
||||
COPY web-server.js .
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
|
|
|
|||
|
|
@ -18,12 +18,16 @@
|
|||
|
||||
<meta charset="UTF-8">
|
||||
<meta content="IE=Edge" http-equiv="X-UA-Compatible">
|
||||
<<<<<<< HEAD
|
||||
<meta name="description" content="Chitfund app to manage your chit funds.">
|
||||
|
||||
<!-- Prevent caching in production for updates -->
|
||||
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
|
||||
<meta http-equiv="Pragma" content="no-cache">
|
||||
<meta http-equiv="Expires" content="0">
|
||||
=======
|
||||
<meta name="description" content="Chitfund Application">
|
||||
>>>>>>> main
|
||||
|
||||
<!-- iOS meta tags & icons -->
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
|
|
|
|||
Loading…
Reference in New Issue