ops: wire the campus-cleanup Railway service (cron schedule + variables, development first)

Open
#1,262 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
Half a day
Newbie friendliness
8/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
docker, mongodb, postgresql
Domain
cloud, devops

Research direction

This is Railway dashboard and access work, not a code change: start with docs/cleanup-deployment.md and Dockerfile.cleanup (shipped in #1261), comparing them with Dockerfile.migrate for the entrypoint pattern. Done means the dev service campus-cleanup has its variables and cron schedule set, and a cleanup_runs row appears in the audit DB, followed by the production steps and an update to docs/railway-variables.md. Production credentials and superadmin access are required, so a newcomer should not start this alone.

Written by the indexing model from the issue text.

Description

Tracking issue for the Railway side of the cleanup deployment (#1243 directive 2; code PR campus#1261 — merging that alone deploys nothing; the service must be created explicitly). Runbook: docs/cleanup-deployment.md (ships with #1261). Superadmin activity; development first, then production.

Checklist

  • Development: create service campus-cleanup explicitly into the dev environment (never duplicate an environment — #1109). Source: this repo, branch weekly, autodeploy on.
  • Build = Dockerfile, path Dockerfile.cleanup (NOT railpack — the entrypoint must be the image CMD, like Dockerfile.migrate).
  • No domain, no healthcheck (batch job; failures show as CRASHED deployments).
  • Variables (references resolve per environment):
    • CLEANUP_JOB_AUDIT_POSTGRESDB_URI = ${{"campus.audit-postgres".DATABASE_URL}}
    • CLEANUP_JOB_AUTH_POSTGRESDB_URI = ${{"campus.auth-postgres".DATABASE_URL}}
    • CLEANUP_JOB_AUTH_MONGODB_URI = ${{"campus.auth-mongodb-dev".MONGO_URL}}
    • DEPLOY = campus.cleanup, ENV from shared.
  • Railway cron schedule on the service (≥5 min apart; cadence decision: #1249). railway cron run for one-offs.
  • First dev run: check the cleanup_runs ledger row lands in the audit DB and the service logs show the three jobs' counts.
  • Production: same steps in the production environment (prod Mongo var: campus.auth-mongodb; credentials-before-first-boot rules #1105).
  • Update docs/railway-variables.md rows from "not yet created" to the live values.

Related: #1243 (epic), #1249 (cadence), #1253 (what may be deleted), #1261 (the code).

Dominant language
Python
Stars
0
Forks
2
Avg merge
39m
Merged PRs (30d)
235

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from nyjc-computing/campus

All issues in nyjc-computing/campus

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.