Repository navigation
Add a Railway template for Nominal - #85
Draft
tomschlick wants to merge 1 commit into
Draft
tomschlick wants to merge 1 commit into
tomschlick wants to merge 1 commit into
Conversation
Deploy web, worker, scheduler, migrate, and Postgres from the published image, and generate APP_KEY plus the first admin password once so every service shares them. Co-authored-by: Tom Schlick <tom@schlick.email>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a Railway template that deploys Nominal from
ghcr.io/returnearly/nominal:latestwith web, worker, scheduler, Postgres, and a one-shot migrate service.railway/template.jsonis the template config. Railway generatesAPP_KEYandNOMINAL_ADMIN_PASSWORDonce on web; the other app services reference those values. Postgres generates its own password and privateDATABASE_URL./uphealth check.checks.$PROBE_REGIONanddefault. scheduler runsschedule:work.php artisan migrate --forceuntil Postgres is up, then runsnominal:provisionand exits. That command creates the default probe and the first admin user. An existing admin keeps their password.TRUSTED_PROXIES=*so Railway's proxy preserves HTTPS.The migrate script and
nominal:provisionship in the image, so this template matcheslatestafter this lands onmaster.Test plan
php artisan test --compact tests/Feature/ProvisionInstanceTest.php tests/Feature/TrustedProxiesTest.php tests/Unit/RailwayTemplateTest.php tests/Arch/ArchTest.php/up, migrate exits 0, and/adminacceptsNOMINAL_ADMIN_EMAIL/NOMINAL_ADMIN_PASSWORDAPP_KEYas web