Migrate frontend from MongoDB/Firebase to Odoo 19 backend
- Remove all MongoDB and Firebase dependencies - Add Odoo proxy layer (src/lib/odoo.ts) for JWT-authenticated API forwarding - Rewrite auth routes (login, logout, register, reset) to use Odoo endpoints - Add catch-all API route ([...path].ts) to proxy remaining endpoints to Odoo - Rewrite special-case routes for file uploads and binary responses - Delete ~85 legacy API routes now handled by catch-all proxy - Replace *.be.ts MongoDB utilities with stub implementations for SSR compat - Update Dockerfile: remove MONGODB_URI, switch from yarn to npm - Update session.ts to store Odoo JWT token Made-with: Cursor
This commit is contained in:
12
Dockerfile
12
Dockerfile
@@ -7,9 +7,8 @@ FROM base AS deps
|
||||
RUN apk add --no-cache libc6-compat
|
||||
WORKDIR /app
|
||||
|
||||
# Install dependencies based on the preferred package manager
|
||||
COPY package.json yarn.lock* ./
|
||||
RUN yarn --frozen-lockfile
|
||||
COPY package.json package-lock.json ./
|
||||
RUN npm ci --legacy-peer-deps
|
||||
|
||||
|
||||
# Rebuild the source code only when needed
|
||||
@@ -23,12 +22,7 @@ COPY . .
|
||||
# Uncomment the following line in case you want to disable telemetry during the build.
|
||||
# ENV NEXT_TELEMETRY_DISABLED 1
|
||||
|
||||
ENV MONGODB_URI "mongodb+srv://user:JKpFBymv0WLv3STj@encoach.lz18a.mongodb.net/?retryWrites=true&w=majority&appName=EnCoach"
|
||||
|
||||
RUN yarn build
|
||||
|
||||
# If using npm comment out above and use below instead
|
||||
# RUN npm run build
|
||||
RUN npm run build
|
||||
|
||||
# Production image, copy all the files and run next
|
||||
FROM base AS runner
|
||||
|
||||
Reference in New Issue
Block a user