add:deploy stuff
This commit is contained in:
18
backend/Dockerfile
Normal file
18
backend/Dockerfile
Normal file
@@ -0,0 +1,18 @@
|
||||
FROM oven/bun:1-alpine
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json ./
|
||||
COPY drizzle.config.ts ./
|
||||
COPY drizzle/ ./drizzle/
|
||||
COPY src/ ./src/
|
||||
|
||||
RUN bun install --frozen-lockfile
|
||||
|
||||
COPY entrypoint.sh ./
|
||||
RUN chmod +x entrypoint.sh
|
||||
|
||||
EXPOSE 4500
|
||||
|
||||
ENTRYPOINT ["./entrypoint.sh"]
|
||||
|
||||
8
backend/entrypoint.sh
Normal file
8
backend/entrypoint.sh
Normal file
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
echo "Running database migrations..."
|
||||
bun run db:migrate
|
||||
|
||||
echo "Starting server..."
|
||||
exec bun run src/index.ts
|
||||
Reference in New Issue
Block a user