feat: implement database setup with direct table creation and improved error handling

This commit is contained in:
Daniel Volz
2025-12-20 17:57:11 +01:00
parent e849f7ea1c
commit c643bfcc47
2 changed files with 75 additions and 14 deletions
+1 -3
View File
@@ -13,9 +13,7 @@ WORKDIR /app
ENV NODE_ENV=production
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/dist ./dist
# Copy migration SQL files (needed for runtime migrations)
COPY --from=builder /app/src/db/migrations ./dist/db/migrations
COPY package.json .
EXPOSE 3000
# Run migrations before starting the server
# Run database setup before starting the server
CMD ["sh", "-c", "mkdir -p /app/data && node dist/db/migrate.js && node dist/index.js"]