fix: add missing migration for viewCount, downloadCount, isPublished, publishedAt, imageUrl

This commit is contained in:
Erik Silva
2026-01-20 23:48:04 -03:00
parent 7ad912baae
commit 1619a813e2
2 changed files with 10 additions and 11 deletions

View File

@@ -55,14 +55,5 @@ EXPOSE 3000
ENV PORT=3000
ENV HOSTNAME="0.0.0.0"
# Run migrations with retry logic and start server
CMD sh -c '\
echo "Waiting for database..." && \
sleep 5 && \
echo "Running migrations..." && \
for i in 1 2 3 4 5; do \
prisma migrate deploy --schema=./prisma/schema.prisma && break || \
(echo "Migration failed, retrying in 5s..." && sleep 5); \
done && \
echo "Starting server..." && \
node server.js'
# Simple startup: try migration once then start (migration errors won't prevent startup)
CMD sh -c "echo 'Waiting 10s for database...' && sleep 10 && echo 'Running migrations...' && prisma migrate deploy --schema=./prisma/schema.prisma || echo 'Migration failed, continuing anyway...' && echo 'Starting server...' && exec node server.js"