@@ -0,0 +1,13 @@
|
|||||||
|
.venv
|
||||||
|
__pycache__
|
||||||
|
*.pyc
|
||||||
|
*.duckdb*
|
||||||
|
.env*
|
||||||
|
!.env.example
|
||||||
|
.git
|
||||||
|
.gitea
|
||||||
|
.docs
|
||||||
|
docs
|
||||||
|
dbt_nba/target/
|
||||||
|
dbt_nba/dbt_packages/
|
||||||
|
dbt_nba/logs/
|
||||||
@@ -42,3 +42,11 @@ jobs:
|
|||||||
export PATH="$HOME/.local/bin:/root/.local/bin:$PATH"
|
export PATH="$HOME/.local/bin:/root/.local/bin:$PATH"
|
||||||
chmod +x ./scripts/pipeline.sh ./scripts/db_storage.py
|
chmod +x ./scripts/pipeline.sh ./scripts/db_storage.py
|
||||||
./scripts/pipeline.sh
|
./scripts/pipeline.sh
|
||||||
|
|
||||||
|
- name: Trigger Coolify Deployment Webhook (Optional)
|
||||||
|
if: env.COOLIFY_WEBHOOK_URL != ''
|
||||||
|
env:
|
||||||
|
COOLIFY_WEBHOOK_URL: ${{ secrets.COOLIFY_WEBHOOK_URL }}
|
||||||
|
run: |
|
||||||
|
echo "==> Triggering Coolify deployment webhook..."
|
||||||
|
curl -fsSL -X POST "$COOLIFY_WEBHOOK_URL" || echo "Webhook trigger skipped or failed"
|
||||||
|
|||||||
@@ -195,3 +195,5 @@ dbt_nba/logs/
|
|||||||
AGENTS.md
|
AGENTS.md
|
||||||
.agents
|
.agents
|
||||||
.claude
|
.claude
|
||||||
|
|
||||||
|
.env.old
|
||||||
+36
@@ -0,0 +1,36 @@
|
|||||||
|
FROM python:3.12-slim
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Install system dependencies (curl for uv, ca-certificates for HTTPS)
|
||||||
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
|
curl \
|
||||||
|
ca-certificates \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Install uv package manager
|
||||||
|
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
|
||||||
|
ENV PATH="/root/.local/bin:$PATH"
|
||||||
|
|
||||||
|
# Copy dependency files and install into container virtualenv
|
||||||
|
COPY pyproject.toml uv.lock* ./
|
||||||
|
RUN uv sync --frozen --no-install-project
|
||||||
|
|
||||||
|
# Copy application files
|
||||||
|
COPY streamlit_app/ ./streamlit_app/
|
||||||
|
COPY scripts/ ./scripts/
|
||||||
|
COPY dbt_nba/reports/ ./dbt_nba/reports/
|
||||||
|
COPY data/ ./data/
|
||||||
|
|
||||||
|
# Make scripts executable
|
||||||
|
RUN chmod +x scripts/*.sh scripts/*.py
|
||||||
|
|
||||||
|
# Expose Streamlit default port
|
||||||
|
EXPOSE 8501
|
||||||
|
|
||||||
|
# Healthcheck to monitor Streamlit availability
|
||||||
|
HEALTHCHECK --interval=30s --timeout=10s --start-period=30s --retries=3 \
|
||||||
|
CMD curl --fail http://localhost:8501/_stcore/health || exit 1
|
||||||
|
|
||||||
|
# Launch: smart sync DB from Cloudflare R2, then start Streamlit
|
||||||
|
CMD ["sh", "-c", "uv run python scripts/db_storage.py download && uv run streamlit run streamlit_app/app.py --server.port=8501 --server.address=0.0.0.0 --server.headless=true --server.enableCORS=false --server.enableXsrfProtection=false"]
|
||||||
Reference in New Issue
Block a user