ทดสอบ DevSecOps
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Flook 2025-02-01 04:59:12 +07:00
parent 2161f09398
commit 43299b4d9e
2 changed files with 7 additions and 2 deletions

View File

@ -1,4 +1,4 @@
node_modules
node_modules/
dist
.git
.git/
.env

View File

@ -18,10 +18,15 @@ RUN npm run build # ✅ ตอนนี้ vite build จะใช้ @vitejs/p
# ใช้ Nginx เป็น Web Server สำหรับเสิร์ฟไฟล์ static
FROM nginx:alpine
RUN adduser -D myuser
USER myuser
# คัดลอกไฟล์ที่ build แล้วไปยัง Nginx
COPY --from=build /app/dist /usr/share/nginx/html
# ลบ cache หรือไฟล์ที่ไม่จำเป็น
RUN rm -rf /var/cache/apk/*
# เปิดพอร์ต 80
EXPOSE 80