Railway Integration

Thursday, July 18, 2024
console cli integrations Railway

railway

You can now sync secrets and environment variables to your Projects and Services on Railway. We've also added support for managing personal overrides from the Phase CLI, along with bug fixes and optimizations for self-hosted users.


Setting up syncing with Railway

To start syncing secrets to Railway, you'll need to create an API token from your Railway account and add it as an authentication mode in Phase Console under Integrations. The API token can be scoped to specific team or just for personal projects. You can find detailed instructions for setting up Railway authentication credentials in the docs.

create credentials

input railway credentials

You can set up syncing with Shared Variables in a Railway Project Environment or a specific Service. Simply choose an Environment in your Phase App as the source of secrets, and the Railway Project Environment as the destination. All associated Services will also be listed and you can optionally choose a target service to sync variables to. Just remember that once setup, your Phase environment will act as the source of truth for all secrets and will overwite any secrets defined in Railway.

create sync

Once setup, Phase will automatically sync your secrets to Railway whenever you create, update or delete a secret in the selected Environment and path.

railway syncs

You can track sync jobs from the Syncing tab of your app and view detailed logs and metadata for each job. You can also pause and resume a specific sync job if needed, or trigger syncs manually.

You can find complete documentation for setting up and managing a Railway integration in the Phase Docs.


Manage personal overrides from the CLI

We've also added support for creating and managing personal overrides from the Phase CLI. Personal overrides allow you to replace a secret value with one unique to your user account. This is handy for things like OAuth credentials, api tokens or SSH keys that are unique to your development setup.

Create an secret with an override

To create a new secret with a pre-defined override, simply add the --override flag:

phase secrets create GOOGLE_CLIENT_ID --override

You will be prompted to enter the override value, and the secret will be created with a blank string as the default value for other users.

Update personal overrides

You can change the override value by adding the --override flag to the update command:

phase secrets update GOOGLE_CLIENT_ID --override

To toggle an override on or off, you can use the --toggle-override flag:

phase secrets update GOOGLE_CLIENT_ID --toggle-override

Console frontend container optimizations

Good news for users self-hosting Phase! We've optimized the frontend container, reducing the image size by 85%, from ~400MB to ~60MB. Simply pull the v2.28.0 tag from the latest release and update your instance!

frontend container optimization


Railway integration, CLI override support and the new optimized frontend container is available in Phase Console v2.28.0

Reach out on Slack or GitHub for any questions or feedback on this release!

CLOUD

The fastest and easiest way to get started with Phase. Spin up an app in minutes. Hosted in Frankfurt 🇩🇪

SELF-HOSTED

Run Phase on your own infrastructure and maintain full control. Perfect for customers with strict compliance requirements.