[FEAT] Add docker files

This commit is contained in:
2026-01-09 03:24:35 +01:00
parent cdb86452c3
commit 1c2325170a
5 changed files with 76 additions and 2 deletions

32
Dockerfile Normal file
View File

@@ -0,0 +1,32 @@
# Build stage
FROM node:22-alpine AS builder
WORKDIR /app
# Copy package files
COPY package.json package-lock.json* ./
# Install dependencies
RUN npm ci
# Copy source files
COPY . .
# Build the app
RUN npm run build
# Production stage
FROM caddy:2-alpine
# Create log directory
RUN mkdir -p /var/log/caddy
# Copy built files
COPY --from=builder /app/dist /srv/dist
# Copy Caddy configuration
COPY Caddyfile.docker /etc/caddy/Caddyfile
EXPOSE 1337
CMD ["caddy", "run", "--config", "/etc/caddy/Caddyfile"]