55e871bd4f
- update-data.js: cron job that aggregates Google Calendar ICS feeds (today + upcoming, node-ical), Netbird reachability, Gitea/GitLab commit stats and Open WebUI models into data.json - server.js: small Node proxy behind nginx exposing /api/chat (Open WebUI completions), /api/gpu-stats and /api/ollama - gitlab-relay.js: prepared HTTP relay for GitLab over a Netbird VPN (not wired up yet; the setup key was rejected by vpn.ixsol.at) - docker-entrypoint.sh: starts updater in the background, API proxy, cron (15 min refresh) and nginx without blocking startup - nginx: proxy locations + no-cache for data.json - compose: TZ, token env wiring from .env, gpu-stats service (python + rocm-smi with device passthrough) - dockerignore: keep .env out of the build context
28 lines
902 B
Docker
28 lines
902 B
Docker
# Dashboard: nginx static host + calendar/data updater + API proxy.
|
|
FROM nginx:1.27-alpine
|
|
|
|
# Install Node.js and cron for the data updater.
|
|
RUN apk add --no-cache nodejs dcron
|
|
|
|
# Copy site assets.
|
|
COPY index.html style.css script.js /usr/share/nginx/html/
|
|
COPY icons /usr/share/nginx/html/icons
|
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
|
|
|
# Backend scripts (node_modules included so the build works offline).
|
|
COPY api /opt/dashboard
|
|
|
|
# Cron refreshes the data feed every 15 minutes.
|
|
RUN echo '*/15 * * * * cd /opt/dashboard && node update-data.js' > /etc/crontabs/root
|
|
|
|
# Entrypoint: run updater once, start API proxy + cron, then nginx.
|
|
COPY docker-entrypoint.sh /docker-entrypoint.sh
|
|
RUN chmod +x /docker-entrypoint.sh
|
|
|
|
EXPOSE 80
|
|
|
|
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
|
|
CMD wget -q --spider http://127.0.0.1:80/ || exit 1
|
|
|
|
ENTRYPOINT ["/docker-entrypoint.sh"]
|