Skip to content

Commit ed5f8a9

Browse files
authored
fix: docker setup (#125)
1 parent 652e0b2 commit ed5f8a9

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

Dockerfile

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,5 @@ RUN npx drizzle-kit generate
1414

1515
EXPOSE 3000
1616

17-
# Create a startup script that will run migrations and then start the app
18-
RUN echo '#!/bin/sh\nnpx drizzle-kit push\nexec "$@"' > /app/docker-entrypoint.sh && \
19-
chmod +x /app/docker-entrypoint.sh
20-
21-
ENTRYPOINT ["/app/docker-entrypoint.sh"]
22-
23-
# Default to development mode
24-
CMD ["npm", "run", "dev"]
17+
# Run migrations and start the app
18+
CMD npx drizzle-kit push && npm run dev

docker-entrypoint.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
npx drizzle-kit push
3+
exec "$@"

0 commit comments

Comments
 (0)