let's try with npm instead of bun...
This commit is contained in:
parent
4460b5abbf
commit
82aefc9bfb
3 changed files with 17 additions and 14 deletions
20
Dockerfile
20
Dockerfile
|
|
@ -1,23 +1,25 @@
|
|||
# Use Bun on Alpine
|
||||
FROM oven/bun:1
|
||||
# Node Alpine -- multi-arch (amd64 + arm64)
|
||||
FROM node:lts-alpine
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /app
|
||||
|
||||
# Copy package files first for caching
|
||||
COPY package.json bun.lock ./
|
||||
# wget is needed for Docker healthcheck
|
||||
RUN apk add --no-cache wget
|
||||
|
||||
# Install all dependencies (including devDeps)
|
||||
RUN bun install
|
||||
# Copy package files first for caching
|
||||
COPY package.json ./
|
||||
|
||||
# Install dependencies
|
||||
RUN npm install
|
||||
|
||||
# Copy the rest of the project
|
||||
COPY . .
|
||||
|
||||
# Build the project
|
||||
RUN bun run build
|
||||
RUN npm run build
|
||||
|
||||
# Expose Vite preview port
|
||||
EXPOSE 4173
|
||||
|
||||
# Run the built project
|
||||
CMD ["bun", "run", "preview", "--", "--host", "0.0.0.0"]
|
||||
CMD ["npm", "run", "preview", "--", "--host", "0.0.0.0"]
|
||||
|
|
|
|||
|
|
@ -1,15 +1,16 @@
|
|||
# Development Dockerfile for hot-reloading
|
||||
FROM oven/bun:1
|
||||
# Node Alpine -- multi-arch (amd64 + arm64)
|
||||
FROM node:lts-alpine
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy package files first for caching
|
||||
COPY package.json bun.lock ./
|
||||
COPY package.json ./
|
||||
|
||||
# Install dependencies
|
||||
RUN bun install
|
||||
RUN npm install
|
||||
|
||||
# Expose Vite dev server port
|
||||
EXPOSE 5173
|
||||
|
||||
CMD ["bun", "run", "dev", "--", "--host", "0.0.0.0"]
|
||||
CMD ["npm", "run", "dev", "--", "--host", "0.0.0.0"]
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ services:
|
|||
volumes:
|
||||
- .:/app
|
||||
- /app/node_modules
|
||||
command: bun run dev -- --host 0.0.0.0
|
||||
command: npm run dev -- --host 0.0.0.0
|
||||
networks:
|
||||
- monochrome-network
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue