Deploy a Quarkus App for Free on Railway (No Credit Card)
To deploy a Quarkus app on Railway(For free registration click here), you need to follow these steps:
1. Prepare your Quarkus Application
Ensure that your Quarkus app is working locally. You can test this by running:
Make sure it works as expected before deploying.
2. Set Up Railway Project
- If you don’t already have a Railway account, sign up at Railway(click here for registration).
- Once logged in, create a new project on Railway.
3. Push Your Quarkus App to GitHub
Railway can integrate with GitHub to deploy your app automatically. Push your Quarkus project to a GitHub repository if it's not already there.
4. Create a New Railway Project
- In your Railway dashboard, click on "New Project."
- Choose the GitHub integration and connect it to your GitHub repository.
- Select the repository containing your Quarkus app.
5. Add a Railway Deployment Configuration
Railway automatically detects Java applications and uses the appropriate buildpack. However, you may need to configure the deployment script.
In your
application.properties
(orapplication.yml
), make sure the HTTP port is set to8080
:If you're using a build tool like Maven, ensure your app is packaged as a JAR or native image that can be run on Railway.
6. Configure Dockerfile (if necessary)
If Railway doesn't automatically detect your Quarkus app, you can create a Dockerfile
to guide the deployment process.
Here’s a basic Dockerfile
for a Quarkus app:
7. Configure Environment Variables
- If your Quarkus app requires any environment variables (like database URLs, API keys, etc.), you can add them in Railway’s environment settings.
8. Deploy the Application
- Railway should automatically start building and deploying your application.
- You can track the progress in the Railway dashboard.
9. Access the Application
- After deployment, Railway will provide you with a URL to access your Quarkus app.
By following these steps, your Quarkus app should be deployed on Railway.