Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build backend as a single file executable on prod #6

Merged
merged 2 commits into from
Jan 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .docker/Dockerfile.prod
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ COPY bun.lockb package.json ./
COPY packages ./packages
RUN bun install

# Build the frontend
# Build the frontend and backend
RUN bun run build

# Install dependencies required for Caddy installation
Expand Down
5 changes: 4 additions & 1 deletion packages/api/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -172,4 +172,7 @@ dist
.idea

# Finder (MacOS) folder config
.DS_Store
.DS_Store

# Bun
*.bun-build
3 changes: 2 additions & 1 deletion packages/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
"private": true,
"description": "Backend",
"scripts": {
"start": "bun src/app.ts",
"start": "./dist/app",
"dev": "bun --hot src/app.ts",
"build": "bun build --compile --minify --sourcemap --bytecode src/app.ts --outfile dist/app",
"compile": "tsc -b --noEmit && tsc-alias",
"test": "DATABASE_URL=$TEST_DATABASE_URL sh -c \"bun run db:migrate && bun test\"",
"test:watch": "DATABASE_URL=$TEST_DATABASE_URL sh -c \"bun run db:migrate && bun test --watch\"",
Expand Down
1 change: 0 additions & 1 deletion packages/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"description": "Frontend",
"scripts": {
"dev": "vite",
"preview": "vite preview",
"build": "vite build",
"compile": "tsc -b --noEmit && tsc-alias",
"test": "bun test",
Expand Down
Loading