39 lines
939 B
Docker
39 lines
939 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 install --omit=dev && 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"]
|