feat(infra): remove Go dashboard, dashboard is now part of hub Next.js app

- Remove dashboard container from observability.yml
- Remove infra/docker/dashboard.Dockerfile
- Remove dashboard route from Traefik apps.yaml
- Mount Docker socket on hub container for /api/dashboard
- Remove dashboard build from CI/CD (docker-build-push.yml)
- Update submodule pointer to hub with Next.js dashboard rewrite

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
asepharyana
2026-07-23 07:23:12 +07:00
co-authored by Claude Opus 4.8
parent cea96fcfc2
commit aaaf5de70c
6 changed files with 5 additions and 58 deletions
+2 -9
View File
@@ -36,7 +36,6 @@ jobs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
scraper-api: ${{ steps.filter.outputs['scraper-api'] == 'true' || steps.dispatch.outputs['scraper-api'] == 'true' || github.event_name == 'workflow_dispatch' }}
hub: ${{ steps.filter.outputs['hub'] == 'true' || steps.dispatch.outputs['hub'] == 'true' || github.event_name == 'workflow_dispatch' }}
dashboard: ${{ steps.filter.outputs['dashboard'] == 'true' || steps.dispatch.outputs['dashboard'] == 'true' || github.event_name == 'workflow_dispatch' }}
steps:
- uses: actions/checkout@v6
with:
@@ -64,7 +63,6 @@ jobs:
echo "scraper-api=$(changed '^(apps/scraper(/|$)|\.github/workflows/docker-build-push\.yml$|infra/docker/scraper\.Dockerfile$)')" >> "$GITHUB_OUTPUT"
echo "hub=$(changed '^(apps/hub(/|$)|\.github/workflows/docker-build-push\.yml$|infra/docker/hub\.Dockerfile$)')" >> "$GITHUB_OUTPUT"
echo "dashboard=$(changed '^(apps/hub/dashboard(/|$)|\.github/workflows/docker-build-push\.yml$|infra/docker/dashboard\.Dockerfile$)')" >> "$GITHUB_OUTPUT"
- name: Parse repository_dispatch payload
id: dispatch
@@ -86,7 +84,7 @@ jobs:
fi
case "$SERVICE" in
scraper-api|hub|dashboard) ;;
scraper-api|hub) ;;
*)
exit 1
;;
@@ -94,7 +92,7 @@ jobs:
if ! [[ "$SHA" =~ ^[0-9a-fA-F]{40}$ ]]; then echo "::error::Invalid sha '$SHA'. Expected 40 hex characters"; fi
SERVICES=(scraper-api hub dashboard)
SERVICES=(scraper-api hub)
for svc in "${SERVICES[@]}"; do
if [ "$SERVICE" = "$svc" ]; then
echo "${svc}=true" >> "$GITHUB_OUTPUT"
@@ -113,7 +111,6 @@ jobs:
if [ "${{ steps.filter.outputs['scraper-api'] == 'true' || steps.dispatch.outputs['scraper-api'] == 'true' || github.event_name == 'workflow_dispatch' }}" == "true" ]; then add_service "scraper-api" "docker-scraper" "apps/scraper"; fi
if [ "${{ steps.filter.outputs['hub'] == 'true' || steps.dispatch.outputs['hub'] == 'true' || github.event_name == 'workflow_dispatch' }}" == "true" ]; then add_service "hub" "docker-hub" "apps/hub"; fi
if [ "${{ steps.filter.outputs['dashboard'] == 'true' || steps.dispatch.outputs['dashboard'] == 'true' || github.event_name == 'workflow_dispatch' }}" == "true" ]; then add_service "dashboard" "docker-dashboard" "infra/dashboard"; fi
JSON_ARRAY="[$(IFS=,; echo "${SERVICES[*]}")]"
echo "matrix=$JSON_ARRAY" >> $GITHUB_OUTPUT
@@ -216,7 +213,6 @@ jobs:
case "$SVC_NAME" in
"scraper-api") echo "dockerfile=infra/docker/scraper.Dockerfile" >> $GITHUB_OUTPUT ;;
"hub") echo "dockerfile=infra/docker/hub.Dockerfile" >> $GITHUB_OUTPUT ;;
"dashboard") echo "dockerfile=infra/docker/dashboard.Dockerfile" >> $GITHUB_OUTPUT ;;
esac
- name: Build and Push Docker image
@@ -262,12 +258,10 @@ jobs:
declare -A SERVICES
SERVICES["scraper-api"]="scraper.yml"
SERVICES["hub"]="hub.yml"
SERVICES["dashboard"]="observability.yml"
declare -A PATHS
PATHS["scraper-api"]="apps/scraper"
PATHS["hub"]="apps/hub"
PATHS["dashboard"]="apps/hub"
# Use git config for possible commits
git config --local user.email "action@github.com"
@@ -277,7 +271,6 @@ jobs:
SHOULD_HAVE_RUN=false
if [ "${{ needs.changes.outputs['scraper-api'] }}" == "true" ] && [ "$id" == "scraper-api" ]; then SHOULD_HAVE_RUN=true; fi
if [ "${{ needs.changes.outputs['hub'] }}" == "true" ] && [ "$id" == "hub" ]; then SHOULD_HAVE_RUN=true; fi
if [ "${{ needs.changes.outputs['dashboard'] }}" == "true" ] && [ "$id" == "dashboard" ]; then SHOULD_HAVE_RUN=true; fi
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then SHOULD_HAVE_RUN=true; fi
+2
View File
@@ -9,6 +9,8 @@ services:
- hub
env_file:
- ../../.env
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
networks:
app-shared-net:
-22
View File
@@ -73,28 +73,6 @@ services:
volumes:
- /:/host:ro,rslave
# ── Custom Dashboard (nginx:alpine) ──
dashboard:
container_name: dashboard
image: ghcr.io/asepharyana/asepharyana-hub/dashboard:sha-5999ac1
build:
context: ../..
dockerfile: infra/docker/dashboard.Dockerfile
restart: always
networks:
app-shared-net:
aliases:
- dashboard
ports:
- '8080:8080'
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
depends_on:
jaeger:
condition: service_started
otel-collector:
condition: service_started
networks:
app-shared-net:
name: app-shared-net
-11
View File
@@ -1,11 +0,0 @@
# ── Build stage ──
FROM golang:1.24-alpine AS builder
WORKDIR /build
COPY apps/hub/dashboard/ ./
RUN CGO_ENABLED=0 go build -ldflags="-s -w" -o dashboard .
# ── Runtime (scratch — ~7MB total) ──
FROM scratch
COPY --from=builder /build/dashboard /dashboard
EXPOSE 8080
CMD ["/dashboard"]
-15
View File
@@ -20,16 +20,6 @@ http:
- common-chain@file
service: scraper-service
# ── Dashboard ──
dashboard:
rule: 'Host(`dashboard.asepharyana.my.id`) || Host(`status.asepharyana.my.id`) || Host(`dashboard.asepharyana.web.id`) || Host(`status.asepharyana.web.id`)'
entryPoints:
- websecure
tls: {}
middlewares:
- common-chain@file
service: dashboard-service
# ── Jaeger UI ──
jaeger:
rule: 'Host(`jaeger.asepharyana.my.id`) || Host(`jaeger.asepharyana.web.id`)'
@@ -51,11 +41,6 @@ http:
servers:
- url: 'http://scraper-api:4091'
dashboard-service:
loadBalancer:
servers:
- url: 'http://dashboard:8080'
jaeger-service:
loadBalancer:
servers: