feat: initial sbsports deployment setup

Add Coolify/Woodpecker CI config, .gitignore, and deployment scripts.
This commit is contained in:
alexandrump
2026-04-22 01:01:42 +02:00
commit 78c5ed52ac
32 changed files with 6088 additions and 0 deletions

39
Dockerfile Normal file
View File

@@ -0,0 +1,39 @@
# ── Stage 1: build ───────────────────────────────────────────────────────────
# Needs build tools (python3, make, g++) to compile better-sqlite3 native addon
FROM node:22-alpine AS builder
RUN apk add --no-cache python3 make g++
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
# ── Stage 2: production ───────────────────────────────────────────────────────
# Lean image with only the runtime artifacts
FROM node:22-alpine
ENV NODE_ENV=production \
PORT=3000 \
DATA_DIR=/app/data
WORKDIR /app
# Copy only production dependencies (re-install native modules for final arch)
COPY package*.json ./
RUN apk add --no-cache python3 make g++ \
&& npm ci --omit=dev \
&& apk del python3 make g++
# Copy server source and built frontend
COPY server/ ./server/
COPY --from=builder /app/dist ./dist/
RUN mkdir -p /app/data
VOLUME ["/app/data"]
EXPOSE 3000
CMD ["node", "server/index.js"]