# # Pilih image dasar untuk Node.js versi 20
# FROM node:20

# # Set direktori kerja di dalam container
# WORKDIR /app

# # Salin package.json dan package-lock.json ke dalam container
# COPY qris_bank_jatim/package*.json ./

# # Install dependencies
# RUN npm install

# # Install nuxt.js secara global (jika belum ada)
# RUN npm install -g nuxt

# # Salin semua file dari folder aplikasi ke dalam container
# COPY qris_bank_jatim/ /app/

# # Expose port yang digunakan aplikasi (biasanya 3000 untuk Nuxt.js)
# EXPOSE 3000

# # Jalankan aplikasi menggunakan Nuxt.js
# CMD ["nuxt", "dev"]

# # Use Node.js 20 Alpine for smaller image
# FROM node:20-alpine

# # Set working directory
# WORKDIR /app

# # Copy package files
# COPY qris_bank_jatim/package*.json ./

# # Install dependencies
# RUN npm install

# # Copy source code
# COPY qris_bank_jatim/ ./

# # Expose port
# EXPOSE 3000

# # Start the development server
# CMD ["npm", "run", "dev"]

FROM node:20-alpine

WORKDIR /app

# Install system dependencies including SQLite and build tools
RUN apk add --no-cache \
    python3 \
    make \
    g++ \
    sqlite \
    sqlite-dev

COPY package*.json ./
RUN npm install

COPY . .

EXPOSE 3000

CMD ["npm", "run", "dev"]