added build confs
All checks were successful
Build & Deploy Vite App (Docker Compose) / build-and-deploy (push) Successful in 54s
All checks were successful
Build & Deploy Vite App (Docker Compose) / build-and-deploy (push) Successful in 54s
This commit is contained in:
17
Dockerfile
Normal file
17
Dockerfile
Normal file
@@ -0,0 +1,17 @@
|
||||
# Stage 1: Build
|
||||
FROM node:24-alpine as build
|
||||
WORKDIR /app
|
||||
COPY package*.json ./
|
||||
RUN npm install
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
|
||||
# Stage 2: Production
|
||||
FROM nginx:alpine
|
||||
# Özel nginx ayarını kopyala
|
||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||
# Build aşamasından çıkan dosyaları Nginx'in servis klasörüne kopyala
|
||||
COPY --from=build /app/dist /usr/share/nginx/html
|
||||
|
||||
EXPOSE 80
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
Reference in New Issue
Block a user