Commit
·
a2e085d
1
Parent(s):
8502b63
chore: Simplify Dockerfile to use Bun preview command directly
Browse files- Dockerfile +2 -10
Dockerfile
CHANGED
@@ -5,19 +5,11 @@ WORKDIR /app
|
|
5 |
# Install dependencies into temp directory
|
6 |
# This will cache them and speed up future builds
|
7 |
COPY package.json bun.lock ./
|
8 |
-
RUN bun install
|
9 |
|
10 |
# Copy all project files and build the application
|
11 |
COPY . .
|
12 |
ENV NODE_ENV=production
|
13 |
RUN bun run build
|
14 |
|
15 |
-
|
16 |
-
FROM nginx:alpine
|
17 |
-
# Copy the built assets from the builder stage
|
18 |
-
COPY --from=builder /app/dist /usr/share/nginx/html
|
19 |
-
# Use custom Nginx configuration
|
20 |
-
COPY ./nginx.conf /etc/nginx/conf.d/default.conf
|
21 |
-
EXPOSE 7860
|
22 |
-
CMD ["nginx", "-g", "daemon off;"]
|
23 |
-
# docker build -t react-app . && docker run -p 7860:7860 react-app
|
|
|
5 |
# Install dependencies into temp directory
|
6 |
# This will cache them and speed up future builds
|
7 |
COPY package.json bun.lock ./
|
8 |
+
RUN bun install
|
9 |
|
10 |
# Copy all project files and build the application
|
11 |
COPY . .
|
12 |
ENV NODE_ENV=production
|
13 |
RUN bun run build
|
14 |
|
15 |
+
CMD ["bun", "run", "preview"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|