Files
petmaster/web/Dockerfile
T

31 lines
524 B
Docker
Raw Normal View History

# Dockerfile for frontend
FROM node:22-alpine AS builder
WORKDIR /app
COPY package.json yarn.lock* ./
RUN yarn install --frozen-lockfile 2>/dev/null || npm install
COPY . .
RUN npm run build
FROM node:22-alpine AS dev
WORKDIR /app
COPY package.json yarn.lock* ./
2026-07-14 05:13:04 +00:00
COPY tsconfig.json ./
RUN yarn install
COPY . .
2026-07-14 05:13:04 +00:00
COPY . .
EXPOSE 3001
CMD ["npm", "run", "start", "--", "--port", "3001"]
FROM nginx:alpine
COPY --from=builder /app/build /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 3001