- Implemented Docker operations including image building, container management, and resource stats. - Added Gitea API client for repository management and webhook handling. - Introduced monitoring service to collect and store container metrics in InfluxDB. - Created a queue system using BullMQ for managing deployment jobs with real-time log streaming. - Developed Telegram notification service for deployment status updates. - Added Traefik label generation for dynamic reverse proxy configuration. - Implemented WebSocket endpoints for log streaming and terminal access to containers. - Created an updater sidecar for self-updating the AutoDeployer container.
39 lines
936 B
Docker
39 lines
936 B
Docker
# ============================================
|
|
# AutoDeployer — No build step, static dashboard
|
|
# ============================================
|
|
FROM node:20-alpine
|
|
|
|
# Install build dependencies for native modules (better-sqlite3, node-pty)
|
|
RUN apk add --no-cache \
|
|
python3 \
|
|
make \
|
|
g++ \
|
|
git \
|
|
docker-cli
|
|
|
|
WORKDIR /app
|
|
|
|
# Install server dependencies
|
|
COPY server/package*.json ./
|
|
RUN npm ci --production && npm cache clean --force
|
|
|
|
# Copy server source
|
|
COPY server/src ./src
|
|
|
|
# Copy static dashboard (no build step needed)
|
|
COPY dashboard/index.html ./public/index.html
|
|
COPY dashboard/css ./public/css
|
|
COPY dashboard/js ./public/js
|
|
COPY dashboard/lib ./public/lib
|
|
|
|
# Create data directory
|
|
RUN mkdir -p /app/data /tmp/builds
|
|
|
|
EXPOSE 3000
|
|
|
|
# Health check
|
|
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
|
|
CMD wget -qO- http://localhost:3000/api/health || exit 1
|
|
|
|
CMD ["node", "src/index.js"]
|