Feat: docker compose done
This commit is contained in:
21
frontend/Dockerfile
Normal file
21
frontend/Dockerfile
Normal file
@@ -0,0 +1,21 @@
|
||||
FROM node:22 AS devdeps
|
||||
|
||||
WORKDIR /app
|
||||
COPY ./package.json ./package-lock.json .
|
||||
RUN npm ci
|
||||
|
||||
#####
|
||||
|
||||
FROM node:22 AS build
|
||||
|
||||
WORKDIR /app
|
||||
COPY . /app
|
||||
COPY --from=devdeps /app/node_modules /app/node_modules
|
||||
RUN npm run build
|
||||
|
||||
#####
|
||||
|
||||
FROM nginx:1.27.5-alpine-slim
|
||||
|
||||
WORKDIR /app
|
||||
COPY --from=build /app/dist /usr/share/nginx/html
|
||||
@@ -4,7 +4,7 @@
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "tsc && vite build",
|
||||
"build": "npx tsc && npx vite build",
|
||||
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
||||
"preview": "vite preview",
|
||||
"test:e2e": "playwright test"
|
||||
|
||||
Reference in New Issue
Block a user