feat(frontend): add multi-stage Dockerfile for Coolify static build
This commit is contained in:
parent
fba4502055
commit
3407bc31c4
1 changed files with 13 additions and 0 deletions
13
frontend/Dockerfile
Normal file
13
frontend/Dockerfile
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
# --- Build stage ---
|
||||||
|
FROM node:20-alpine AS build
|
||||||
|
WORKDIR /app
|
||||||
|
COPY package*.json ./
|
||||||
|
RUN npm ci
|
||||||
|
COPY . .
|
||||||
|
RUN npm run build
|
||||||
|
|
||||||
|
# --- Serve stage ---
|
||||||
|
FROM nginx:alpine
|
||||||
|
WORKDIR /usr/share/nginx/html/
|
||||||
|
COPY --from=build /app/dist .
|
||||||
|
COPY ./nginx.conf /etc/nginx/conf.d/default.conf
|
||||||
Loading…
Add table
Reference in a new issue