Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,34 @@ WORKDIR /app
# C++ library with Python bindings) doesn't ship a prebuilt wheel for
# whatever platform Glama builds on -- without it, that one line in
# requirements.txt could fail to install and take the whole build down.
#
# curl is needed for the litestream install step below.
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
curl \
&& rm -rf /var/lib/apt/lists/*

COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

COPY . .

# 2026-09-09 fix (real Railway outage): railway.json's own "deploy.startCommand"
# always runs `/app/bin/litestream ...` to wrap uvicorn (continuous SQLite
# replication), regardless of which builder actually produced the image.
# Adding this Dockerfile in PR #51 caused a real production deploy failure --
# "The executable /app/bin/litestream could not be found" -- because Railway
# built from THIS file instead of nixpacks.toml (which is where litestream
# was previously installed, in its own [phases.litestream] block) even
# though railway.json pins "builder": "NIXPACKS". Installing the identical
# binary here (same version/URL as nixpacks.toml) makes this Dockerfile
# correct no matter which builder Railway or any other platform picks.
RUN mkdir -p /app/bin \
&& curl -L https://github.com/benbjohnson/litestream/releases/download/v0.3.13/litestream-v0.3.13-linux-amd64.tar.gz -o /tmp/litestream.tar.gz \
&& tar -xzf /tmp/litestream.tar.gz -C /app/bin \
&& chmod +x /app/bin/litestream \
&& rm -f /tmp/litestream.tar.gz

# Same placeholder pattern already proven in .github/workflows/ci.yml:
# services/news_service.py's NewsService.__init__ only checks that
# NEWS_API_KEY is *present* at import time -- it never calls the real
Expand Down