feat: add Docker deployment with HAProxy and blue-green strategy

This commit is contained in:
badblocks 2025-07-21 23:25:19 -07:00
parent 3cfa59d3a5
commit 5be1e5add5
No known key found for this signature in database
26 changed files with 56198 additions and 582 deletions

31
Dockerfile Normal file
View file

@ -0,0 +1,31 @@
FROM node:24-slim
ARG VERSION=0.0.0
WORKDIR /app
RUN apt-get update && apt-get install -y python3 make g++ curl net-tools && rm -rf /var/lib/apt/lists/*
COPY package.json package-lock.json* ./
RUN npm ci
COPY . .
RUN npx nuxt build
ENV NUXT_HOST=0.0.0.0
ENV NUXT_PORT=3000
ENV NODE_ENV=production
ENV NODE_PATH=/app/node_modules
ENV APP_VERSION=${VERSION}
ENV PUID=1000
ENV PGID=1000
RUN mkdir -p data && chown -R ${PUID}:${PGID} data && chown -R ${PUID}:${PGID} /app && chmod 755 /app data
EXPOSE 3000
USER ${PUID}:${PGID}
CMD ["node", ".output/server/index.mjs"]