first commit

This commit is contained in:
2025-11-26 07:12:51 +00:00
commit 3e43db51d3
7 changed files with 98 additions and 0 deletions

24
Dockerfile Normal file
View File

@@ -0,0 +1,24 @@
FROM node:22.14.0-alpine AS builder
# Set working directory
WORKDIR /app
# Salin package.json dan package-lock.json
COPY package*.json ./
# Install dependencies
RUN npm install
# Salin semua file source code
COPY . .
# (Opsional) Jalankan sebagai non-root user
RUN addgroup -S appgroup && adduser -S appuser -G appgroup
USER appuser
# Ekspos port
EXPOSE 4000
# Perintah untuk menjalankan aplikasi
CMD [ "node", "src/server.js" ]