feat: add frontend service + dockerfile + env example
This commit is contained in:
parent
04835f31b6
commit
eb701bbb8a
3 changed files with 48 additions and 0 deletions
20
frontend/Dockerfile
Normal file
20
frontend/Dockerfile
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
FROM node:22-alpine AS deps
|
||||
WORKDIR /app
|
||||
COPY package.json package-lock.json ./
|
||||
RUN npm ci
|
||||
|
||||
FROM node:22-alpine AS build
|
||||
WORKDIR /app
|
||||
COPY --from=deps /app/node_modules ./node_modules
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
|
||||
FROM node:22-alpine AS runtime
|
||||
WORKDIR /app
|
||||
ENV NODE_ENV=production HOST=0.0.0.0 PORT=3000
|
||||
COPY --from=build /app/dist ./dist
|
||||
COPY --from=build /app/node_modules ./node_modules
|
||||
COPY --from=build /app/package.json ./
|
||||
USER node
|
||||
EXPOSE 3000
|
||||
CMD ["node", "./dist/server/entry.mjs"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue