- Add backend entrypoint with automated Prisma migrations and client regeneration - Add frontend entrypoint with dependency management - Update Dockerfiles to use entrypoint scripts - Ensures database schema stays in sync with Prisma Client after migrations
26 lines
479 B
Docker
26 lines
479 B
Docker
FROM node:20-alpine
|
|
|
|
WORKDIR /app
|
|
|
|
# Copy package files
|
|
COPY package*.json ./
|
|
|
|
# Install dependencies
|
|
RUN npm install
|
|
|
|
# Copy project files
|
|
COPY . .
|
|
|
|
# Copy and set permissions for entrypoint script
|
|
COPY docker-entrypoint.sh /usr/local/bin/
|
|
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
|
|
|
|
# Expose Vite dev server port
|
|
EXPOSE 5173
|
|
|
|
# Set entrypoint
|
|
ENTRYPOINT ["docker-entrypoint.sh"]
|
|
|
|
# Default command (can be overridden)
|
|
CMD ["npm", "run", "dev", "--", "--host", "0.0.0.0"]
|