Home / Companies / Railway / Blog / September 2022

September 2022 Summaries

3 posts from Railway

Filter
Month: Year:
Post Summaries Back to Blog
We will go over an example template to work with queues in JavaScript using BullMQ and Redis, along with deploying a Fastify server to serve the dashboard. The template uses environment variables to establish a connection to the Redis instance, creates a new queue called WelcomeEmailQueue, and sets up a dashboard to visualize and monitor the queue. It also includes an endpoint to add jobs to the queue via an API request, where each request requires email and id query parameters. A dummy worker demonstrates job progress and randomly fails jobs to show how failed jobs look in the dashboard and can be retried. The template is intentionally simple and can be extended for more functionality and used with other queueing libraries.
Sep 16, 2022 757 words in the original blog post.
Working with NX, Railway and CI/CD` Deploying an NX monorepo on Railway using GitHub Actions involves setting up a workflow that triggers deployments for affected projects whenever code changes are pushed to the main or dev branches. The process starts by adding the repository containing the sample project to a Railway project, configuring the NX app name, disabling the GitHub trigger, and creating separate environments for the main and dev branches. Next, project tokens are created and added as repository secrets on GitHub, which are used in the workflow to authenticate with Railway. A GitHub Actions workflow is set up to run on every commit to the main and dev branches, testing if a particular project has been affected and deploying it to the correct environment on Railway if necessary. The workflow uses the `pnpm nx` command to determine which projects have been affected and then triggers a deployment using the Railway CLI. The process also involves dumping access secrets into a file in JSON format for security reasons.
Sep 16, 2022 684 words in the original blog post.
The Railway team has created an automated PostgreSQL backup service that can be deployed with a single click, allowing users to easily back up and restore their databases. To deploy the service, users need to set up an S3 bucket on AWS, create an IAM user with access to the bucket, and configure the service with variables such as the database URL and cron schedule. The service uses a simple JavaScript template that can be extended to backup other databases or use alternative storage solutions. Once deployed, the service automatically backs up data to the S3 bucket, which can be easily restored using the `pg_restore` command.
Sep 02, 2022 803 words in the original blog post.