mirror of
https://github.com/Afilmory/afilmory
synced 2026-04-24 23:05:05 +00:00
feat: add database migration CLI and entrypoint script
- Introduced a new entrypoint script to handle database migrations before starting the application. - Implemented CLI commands for database migration, including argument parsing and execution logic. - Updated Dockerfile to copy the entrypoint script and set it as the container's entrypoint. Signed-off-by: Innei <tukon479@gmail.com>
This commit is contained in:
@@ -32,6 +32,9 @@ WORKDIR /app
|
||||
RUN apk add --no-cache perl
|
||||
COPY --from=builder /workspace/be/apps/core/dist ./dist
|
||||
COPY --from=builder /workspace/be/packages/db/migrations ./migrations
|
||||
COPY --from=builder /workspace/be/apps/core/docker-entrypoint.sh ./docker-entrypoint.sh
|
||||
|
||||
RUN chmod +x ./docker-entrypoint.sh
|
||||
|
||||
RUN if [ -f dist/package.json ]; then \
|
||||
cd dist && \
|
||||
@@ -40,4 +43,5 @@ RUN if [ -f dist/package.json ]; then \
|
||||
|
||||
EXPOSE 1841
|
||||
|
||||
ENTRYPOINT ["./docker-entrypoint.sh"]
|
||||
CMD ["node", "./dist/main.js"]
|
||||
|
||||
Reference in New Issue
Block a user