Custom build command using bash init.sh
Hi, guys! I want to deploy my server via bash init.sh but the web always auto detect to build a dockerfile. How can I have my custom build command enabled? Thank you all!
9 Replies
Project ID:
N/A
N/A
You’ll see the option to configure a custom start command in the “Deploy” category beneath that.
This is deploy command, not build command, I checked it!
Ohh, build command. My apologies.
To enable your custom build command instead of the auto-detected Dockerfile during the deployment on Railway, you can follow these steps:
1. Create a
railway.toml
file: In your project's root directory, create a file named railway.toml
. This file will allow you to customize the deployment settings.
2. Specify the build command: Open the railway.toml
file and add the following content:
Replace "bash init.sh"
with your actual build command.
3. Commit and push changes: Save the railway.toml
file, commit your changes, and push them to your repository.
4. Deploy on Railway: With the railway.toml
file in place, Railway will use your specified build command (bash init.sh
) instead of the auto-detected Dockerfile during deployment.seems like it does not work, it pushed it on but nothing changed
Oh my apologies, try referencing this.
“buildCommand”, my bad.
dockerfile will override all build commands you set in the UI, if you wish to use nixpacks remove the dockerfile or rename it