#Custom build command using bash init.sh

12 messages · Page 1 of 1 (latest)

cedar pike
#

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!

fallen currentBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

potent sierraBOT
#

Project ID: N/A

cedar pike
#

N/A

lunar cliff
cedar pike
#

This is deploy command, not build command, I checked it!

lunar cliff
#

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:

    [build]
    command = "bash init.sh"
    

    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.

cedar pike
#

seems like it does not work, it pushed it on but nothing changed

lunar cliff
#

Oh my apologies, try referencing this.

[build]
builder = "nixpacks"
buildCommand = "echo building!"
#

“buildCommand”, my bad.