pramudya-yb commited on
Commit ·
e5b2852
1
Parent(s): 2b62b0c
Create Dockerfile
Browse files- Dockerfile +20 -0
Dockerfile
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM oven/bun:1 as base
|
| 2 |
+
WORKDIR /app
|
| 3 |
+
|
| 4 |
+
# Copy configuration and workspaces
|
| 5 |
+
COPY package.json bun.lock turbo.json ./
|
| 6 |
+
COPY apps ./apps
|
| 7 |
+
COPY packages ./packages
|
| 8 |
+
|
| 9 |
+
# Install dependencies using Bun
|
| 10 |
+
RUN bun install --frozen-lockfile
|
| 11 |
+
|
| 12 |
+
# Build the API server
|
| 13 |
+
ENV NODE_ENV=production
|
| 14 |
+
RUN bunx turbo build -F server
|
| 15 |
+
|
| 16 |
+
# Expose port (biasanya Back4App menggunakan port otomatis, tapi kita set 3000 sesuai default)
|
| 17 |
+
EXPOSE 3000
|
| 18 |
+
|
| 19 |
+
# Jalankan server
|
| 20 |
+
CMD ["bun", "run", "--cwd", "apps/server", "start"]
|