refactor: migrate from Next.js to SolidJS and GraphQL
- Converted web application from Next.js to SolidJS with Vite - Replaced React components with SolidJS components - Implemented GraphQL client using URQL - Added authentication, room, and chat components - Updated project structure and configuration files - Removed unnecessary Next.js and docs-related files - Added Docker support for web and API applications
This commit is contained in:
parent
8f3aa2fc26
commit
16731409df
81 changed files with 13585 additions and 1163 deletions
44
apps/web/Dockerfile
Normal file
44
apps/web/Dockerfile
Normal file
|
@ -0,0 +1,44 @@
|
|||
FROM node:22-alpine AS base
|
||||
|
||||
# Install dependencies only when needed
|
||||
FROM base AS deps
|
||||
WORKDIR /app
|
||||
|
||||
# Copy package files
|
||||
COPY package.json package-lock.json* ./
|
||||
COPY apps/web/package.json ./apps/web/package.json
|
||||
|
||||
# Install dependencies
|
||||
RUN npm ci
|
||||
|
||||
# Rebuild the source code only when needed
|
||||
FROM base AS builder
|
||||
WORKDIR /app
|
||||
COPY --from=deps /app/node_modules ./node_modules
|
||||
COPY . .
|
||||
|
||||
# Build the project
|
||||
ARG NODE_ENV
|
||||
ARG VITE_API_URL
|
||||
ARG VITE_WS_URL
|
||||
RUN npm run web:build
|
||||
|
||||
# Production image, copy all the files and run the server
|
||||
FROM base AS runner
|
||||
WORKDIR /app
|
||||
|
||||
ENV NODE_ENV production
|
||||
|
||||
# Copy necessary files
|
||||
COPY --from=builder /app/apps/web/dist ./dist
|
||||
COPY --from=builder /app/apps/web/package.json ./package.json
|
||||
COPY --from=builder /app/node_modules ./node_modules
|
||||
|
||||
# Install serve to run the application
|
||||
RUN npm install -g serve
|
||||
|
||||
# Expose the port
|
||||
EXPOSE 5173
|
||||
|
||||
# Start the server
|
||||
CMD serve -s dist -l 5173
|
Loading…
Add table
Add a link
Reference in a new issue