Skip to content

Commit

Permalink
added db commands
Browse files Browse the repository at this point in the history
  • Loading branch information
xamey committed Nov 18, 2024
1 parent 2a0843a commit cd21114
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,19 @@ COPY . .
# Install node modules
RUN bun install

# Run bun:migration:drop if DB_DROP is set
RUN if [ "$DB_DROP" = "true" ]; then bun run migration:drop; fi

# Run bun:migration:create if DB_CREATE is set
RUN if [ "$DB_CREATE" = "true" ]; then bun run migration:create; fi

# Run bun:migration:run if DB_RUN is set
RUN if [ "$DB_RUN" = "true" ]; then bun run migration:run; fi
# Run bun:migration:seed if DB_SEED is set
RUN if [ "$DB_SEED" = "true" ]; then bun run migration:seed; fi
# Run bun:migration:drop if DB_DROP is set
RUN if [ "$DB_DROP" = "true" ]; then bun run migration:drop; fi

# Start the server by default, this can be overwritten at runtime
EXPOSE 3000
CMD [ "bun", "run", "dev" ]

0 comments on commit cd21114

Please sign in to comment.