Gabungkan aplikasi RPS & Portofolio OBE (dashboard jadi bagian aplikasi)
Dashboard pemetaan statis kini dilayani aplikasi di /dashboard (app/static/dashboard.html). Fitur lengkap Tahap 1-4 + dasbor monitoring, menu global, filter semester, input nilai langsung, penggabungan nilai team teaching, tabel bisa urut. Dockerfile berubah dari nginx statis ke uvicorn/FastAPI: healthcheck, proxy-headers, volume /data (SQLite). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
+23
-5
@@ -1,7 +1,25 @@
|
||||
FROM nginx:alpine
|
||||
FROM python:3.12-slim
|
||||
|
||||
# Dashboard static single-page (tanpa backend) disajikan di root "/"
|
||||
COPY Dashboard_Pemetaan_CPMK.html /usr/share/nginx/html/index.html
|
||||
# Opsional: aktifkan baris berikut agar tombol "PDF" berfungsi di server
|
||||
# (menambah ukuran image ±700 MB):
|
||||
# RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
# libreoffice-writer && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Target routing / health check Coolify
|
||||
EXPOSE 80
|
||||
WORKDIR /srv
|
||||
COPY requirements.txt .
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
COPY app ./app
|
||||
COPY seed ./seed
|
||||
|
||||
ENV DB_PATH=/data/app.db \
|
||||
PYTHONUNBUFFERED=1
|
||||
VOLUME /data
|
||||
|
||||
EXPOSE 8000
|
||||
HEALTHCHECK --interval=30s --timeout=5s --start-period=15s \
|
||||
CMD python -c "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8000/login')" || exit 1
|
||||
|
||||
# --proxy-headers: hormati X-Forwarded-* dari reverse proxy Coolify (Traefik)
|
||||
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000", \
|
||||
"--proxy-headers", "--forwarded-allow-ips=*"]
|
||||
|
||||
Reference in New Issue
Block a user