fix: add missing migration for viewCount, downloadCount, isPublished, publishedAt, imageUrl
This commit is contained in:
13
Dockerfile
13
Dockerfile
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user