Skip to content

Commit

Permalink
fix: use bun start for production mode in Docker
Browse files Browse the repository at this point in the history
- Update docker-compose.yaml to use bun start
- Ensure consistency with Dockerfile CMD
- Optimize for production environment
  • Loading branch information
miurla committed Feb 14, 2025
1 parent 23b9089 commit 8828a34
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# Base image
FROM oven/bun:1.1.3-alpine AS builder

Expand Down Expand Up @@ -27,5 +26,5 @@ COPY --from=builder /app/package.json ./package.json
COPY --from=builder /app/bun.lockb ./bun.lockb
COPY --from=builder /app/node_modules ./node_modules

# Start development server
CMD ["bun", "dev", "-H", "0.0.0.0"]
# Start production server
CMD ["bun", "start", "-H", "0.0.0.0"]
2 changes: 1 addition & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ name: morphic-stack
services:
morphic:
image: ghcr.io/${GITHUB_REPOSITORY:-your-username/morphic}:latest
command: bun start -H 0.0.0.0
build:
context: .
dockerfile: Dockerfile
cache_from:
- morphic:builder
- morphic:latest
command: bun dev -H 0.0.0.0
env_file: .env.local # Load environment variables
ports:
- '3000:3000' # Maps port 3000 on the host to port 3000 in the container.
Expand Down

0 comments on commit 8828a34

Please sign in to comment.