Add SQL init fallback for todos table creation
This commit is contained in:
@@ -10,4 +10,6 @@ COPY . .
|
||||
|
||||
# Generate migrations and run
|
||||
EXPOSE 3100
|
||||
CMD ["sh", "-c", "echo 'Running db:push...' && yes | bun run db:push 2>&1 && echo 'db:push done' && bun run start"]
|
||||
RUN apt-get update && apt-get install -y postgresql-client && rm -rf /var/lib/apt/lists/*
|
||||
COPY init-todos.sql /app/init-todos.sql
|
||||
CMD ["sh", "-c", "echo 'Running init SQL...' && psql \"$DATABASE_URL\" -f /app/init-todos.sql 2>&1 && echo 'Init SQL done' && echo 'Running db:push...' && yes | bun run db:push 2>&1; echo 'db:push exit code:' $? && echo 'Starting server...' && bun run start"]
|
||||
|
||||
Reference in New Issue
Block a user