Skip to content
Open
Show file tree
Hide file tree
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
4 changes: 0 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ ENV PYTHONUNBUFFERED=1

WORKDIR /app

RUN apt-get update \
&& apt-get install -y --no-install-recommends sqlite3 \
&& rm -rf /var/lib/apt/lists/*

COPY pyproject.toml README.md ./
COPY src ./src

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ You will be redirected to Google to sign in. Only emails in `ALLOWED_EMAILS` are

When deploying (e.g. to Railway):

- **Railway builds the Dockerfile** using `python:3.12-slim-bookworm`, installs `sqlite3` for SSH database inspection, installs the package with `pip install .`, and starts uvicorn via `railway.json` `startCommand`. Railway injects `$PORT` and the start command binds to it.
- **Railway builds the Dockerfile** using `python:3.12-slim-bookworm`, installs the package with `pip install .`, and starts uvicorn via `railway.json` `startCommand`. Railway injects `$PORT` and the start command binds to it.
- **For SQLite, mount a persistent volume** at `/data` and set `DATABASE_URL=sqlite:////data/argus.db`. SQLite written to the container's local filesystem will be wiped on every redeploy.
- **`SESSION_SECRET` is required** — the app refuses to boot without it. Generate with `python -c "import secrets; print(secrets.token_hex(32))"`.
- **Port:** the Dockerfile's `CMD` binds to a fixed port 8000. Railway overrides this via `railway.json`'s `startCommand`, which substitutes its injected `$PORT`. To change the port in non-Railway environments, override the container command (e.g. `docker run … argus-image uvicorn argus.main:app --host 0.0.0.0 --port 9000`).
Expand Down
2 changes: 1 addition & 1 deletion SPEC.md
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ ARGUS_MANUAL_TEST=1 uv run pytest tests/test_discord_format_manual.py -v -s
2. Create new Railway project → Deploy from GitHub repo
3. Add a Volume, mount at `/data`, set `DATABASE_URL=sqlite:////data/argus.db`
4. Set all required environment variables in Railway dashboard
5. Railway builds `Dockerfile`, installs the package and SQLite CLI, then runs uvicorn against `argus.main:app`. The exact start command (with `$PORT` injection) comes from `railway.json`'s `startCommand`, which overrides the Dockerfile's `CMD`.
5. Railway builds `Dockerfile`, installs the package, then runs uvicorn against `argus.main:app`. The exact start command (with `$PORT` injection) comes from `railway.json`'s `startCommand`, which overrides the Dockerfile's `CMD`.

```json
{
Expand Down
Loading