fix: docker setup (#125)

This commit is contained in:
Faizan Ahmed
2025-03-18 19:05:30 -04:00
committed by GitHub
parent 652e0b205c
commit ed5f8a93dd
2 changed files with 5 additions and 8 deletions

View File

@@ -14,11 +14,5 @@ RUN npx drizzle-kit generate
EXPOSE 3000
# Create a startup script that will run migrations and then start the app
RUN echo '#!/bin/sh\nnpx drizzle-kit push\nexec "$@"' > /app/docker-entrypoint.sh && \
chmod +x /app/docker-entrypoint.sh
ENTRYPOINT ["/app/docker-entrypoint.sh"]
# Default to development mode
CMD ["npm", "run", "dev"]
# Run migrations and start the app
CMD npx drizzle-kit push && npm run dev

3
docker-entrypoint.sh Executable file
View File

@@ -0,0 +1,3 @@
#!/bin/sh
npx drizzle-kit push
exec "$@"