27 lines
540 B
Docker
27 lines
540 B
Docker
# Use Node.js 22.11.0 as the base image
|
|
FROM node:22.11.0
|
|
|
|
# Install git for development
|
|
RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
|
|
|
|
# Set the working directory
|
|
WORKDIR /app
|
|
|
|
# Copy package.json and package-lock.json (if any)
|
|
COPY package*.json ./
|
|
|
|
# Install dependencies
|
|
RUN npm install
|
|
|
|
# Copy the rest of the app
|
|
COPY . .
|
|
|
|
# Create the default admin account for development
|
|
RUN node scripts/create-admin.js
|
|
|
|
# Expose the default Next.js port
|
|
EXPOSE 3000
|
|
|
|
# Start the dev server
|
|
CMD ["npm", "run", "dev"]
|