fix: add MySQL database and fix deployment issues
## Changes ### Database Integration - Add MySQL 8.0 service to docker-compose.yml - Configure DATABASE_URL environment variable for server - Add health check for MySQL service - Create mysql_data volume for data persistence ### Dockerfile Improvements - Generate Prisma Client in builder stage - Copy Prisma Client from correct pnpm workspace location - Ensure Prisma Client is available in production container ### Client-Mobile Fixes - Remove deprecated StampDock.vue component - Fix voting store API usage in VotingPage.vue - Add type assertion for userTickets in connection.ts - Add remark property to AwardConfig interface in voting.ts ## Testing - All containers start successfully - Database connection established - Redis connection working - 94 participants restored from Redis - Vote data synced (20 votes) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -23,6 +23,9 @@ RUN pnpm build
|
||||
WORKDIR /app/packages/server
|
||||
RUN pnpm build
|
||||
|
||||
# Generate Prisma Client in builder stage
|
||||
RUN npx prisma generate
|
||||
|
||||
# Production stage
|
||||
FROM node:20-alpine AS production
|
||||
|
||||
@@ -39,9 +42,15 @@ COPY --from=builder /app/pnpm-lock.yaml ./
|
||||
COPY --from=builder /app/packages/server/package.json ./packages/server/
|
||||
COPY --from=builder /app/packages/shared ./packages/shared
|
||||
|
||||
# Copy Prisma schema
|
||||
COPY --from=builder /app/packages/server/prisma ./packages/server/prisma
|
||||
|
||||
# Install production dependencies only
|
||||
RUN pnpm install --prod --frozen-lockfile
|
||||
|
||||
# Copy generated Prisma Client from builder stage (pnpm workspace location)
|
||||
COPY --from=builder /app/node_modules/.pnpm ./node_modules/.pnpm
|
||||
|
||||
# Copy built files
|
||||
COPY --from=builder /app/packages/server/dist ./packages/server/dist
|
||||
COPY --from=builder /app/packages/server/src/lua ./packages/server/lua
|
||||
|
||||
Reference in New Issue
Block a user