Add fullstack example
This commit is contained in:
19
examples/fullstack/frontend/Dockerfile
Normal file
19
examples/fullstack/frontend/Dockerfile
Normal file
@ -0,0 +1,19 @@
|
||||
FROM node:22-alpine AS base
|
||||
WORKDIR /app
|
||||
COPY package.json yarn.lock ./
|
||||
RUN yarn install
|
||||
COPY . .
|
||||
|
||||
FROM base AS build
|
||||
WORKDIR /app
|
||||
COPY --from=base /app/* .
|
||||
RUN yarn build
|
||||
|
||||
FROM base AS develop
|
||||
COPY --from=base /app/ .
|
||||
EXPOSE 5173
|
||||
ENTRYPOINT [ "yarn", "dev", "--host", "0.0.0.0" ]
|
||||
|
||||
FROM nginx:alpine AS production
|
||||
COPY --from=build /app/dist/ /usr/share/nginx/html
|
||||
ENTRYPOINT [ "nginx", "-g", "daemon off;" ]
|
Reference in New Issue
Block a user