feat: add docker-compose for deployment

This commit is contained in:
2025-07-04 10:50:05 +02:00
parent a86e92d52e
commit 8dc9dfd100
35 changed files with 1106 additions and 130 deletions

28
Dockerfile Normal file
View File

@@ -0,0 +1,28 @@
# Use the official Node.js 22 LTS image.
FROM node:22-alpine AS base
# Set the working directory in the container.
WORKDIR /app
# Install git.
RUN apk add --no-cache git
# Clone the repository.
# IMPORTANT: Replace with your actual repository URL.
RUN git clone https://git.haider.app/your-repo.git .
# Install dependencies.
RUN npm install
# Build the Next.js application.
RUN npm run build
# Create a non-root user to run the application.
RUN addgroup -S nextjs && adduser -S nextjs -G nextjs
USER nextjs
# Expose the port the app runs on.
EXPOSE 8150
# Set the command to start the application.
CMD ["npm", "start", "--", "-p", "8150"]