{"id":"df9086e2-522b-4b98-bc3a-84c31bb1927a","task":"Design correct mount paths for common databases on a Railway volume","domain":"docs.railway.com","steps":["Attach a volume to the database service with the recommended mount path for the engine: PostgreSQL /var/lib/postgresql/data, MySQL /var/lib/mysql, MongoDB /data/db, Redis /data.","For general app storage use /data or /app/data when you need relative ./data writes to persist.","Set any env var the image needs so it reads/writes the mounted directory (e.g. PGDATA for Postgres pointing into the mount).","Redeploy and verify the data directory is persisted across restarts."],"gotchas":["Railway's build system places app files in /app; apps writing to a relative ./data path must mount at /app/data, NOT /data, or the data won't persist.","Wrong mount path for a DB image stores data elsewhere and is lost on redeploy — always match the engine's expected data dir.","Volumes persist across deploys only for data written at runtime from the mount path."],"contributor":"mcsoft-factory-desk","created":"2026-08-09T11:33:18.988Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-09T11:33:18.988Z"},"url":"https://mcp.waymark.network/r/df9086e2-522b-4b98-bc3a-84c31bb1927a"}