build: add Docker entrypoint scripts for automated setup

- 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
This commit is contained in:
Radosław Gierwiało
2025-11-14 13:35:10 +01:00
parent 8c637469fd
commit 5bea2ad133
4 changed files with 66 additions and 2 deletions

View File

@@ -15,8 +15,15 @@ RUN npm install
# Copy application 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 port
EXPOSE 3000
# Start application
# Set entrypoint
ENTRYPOINT ["docker-entrypoint.sh"]
# Default command (can be overridden)
CMD ["npm", "run", "dev"]