mirror of
https://github.com/Kpa-clawbot/meshcore-analyzer.git
synced 2026-03-29 09:40:22 +00:00
Go server is production-ready. Users upgrading via git pull + manage.sh get Go automatically. No flags, no engine selection, no decision needed. - Dockerfile (was Dockerfile.go) — Go multi-stage build - Dockerfile.node — archived Node.js build for rollback - docker-compose staging-go now builds from Dockerfile Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
38 lines
1.1 KiB
Docker
38 lines
1.1 KiB
Docker
FROM node:22-alpine
|
|
|
|
RUN apk add --no-cache mosquitto mosquitto-clients supervisor caddy
|
|
|
|
WORKDIR /app
|
|
|
|
# Install Node dependencies
|
|
COPY package.json package-lock.json ./
|
|
RUN npm ci --production
|
|
|
|
# Copy application
|
|
COPY *.js config.example.json channel-rainbow.json ./
|
|
COPY public/ ./public/
|
|
|
|
# Bake git commit SHA (CI writes .git-commit before build; fallback to "unknown")
|
|
COPY .git-commi[t] ./
|
|
RUN if [ ! -f .git-commit ]; then echo "unknown" > .git-commit; fi
|
|
|
|
# Supervisor + Mosquitto + Caddy config
|
|
COPY docker/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
|
COPY docker/mosquitto.conf /etc/mosquitto/mosquitto.conf
|
|
COPY docker/Caddyfile /etc/caddy/Caddyfile
|
|
|
|
# Create data directory for SQLite + Mosquitto persistence + Caddy certs
|
|
RUN mkdir -p /app/data /var/lib/mosquitto /data/caddy && \
|
|
chown -R node:node /app/data && \
|
|
chown -R mosquitto:mosquitto /var/lib/mosquitto
|
|
|
|
# Default config: copy example if no config mounted
|
|
COPY docker/entrypoint.sh /entrypoint.sh
|
|
RUN chmod +x /entrypoint.sh
|
|
|
|
EXPOSE 80 443 1883
|
|
|
|
VOLUME ["/app/data", "/data/caddy"]
|
|
|
|
ENTRYPOINT ["/entrypoint.sh"]
|