Docker deployment custom start command
I am trying to start the Docker image with additional parameters like this:
./packages/cli/bin/app.js daemon --api http://myapp.railway.internal
The config file seems to be adding a semicolon at the end of the URL "http://myapp.railway.internal";
which is then invalid JSON format, like below:
}
Is there a way to prevent that or a workaround when using custom start commands? When running the Docker image locally / server / k8s it works as expected.Solution:Jump to solution
with simple code that prints each arg out, i was not able to reproduce this
this is something the code is adding, further proven by the semicolon appearing outside of the double quotes, if this was railway adding a semicolon to the last argument thats passed in you would see that semicolon appear within the double quotes...
6 Replies
Project ID:
N/A
N/A
interesting, I've never seen this issue before, but try wrapping that command in a shell like so
also used
$RAILWAY_PUBLIC_DOMAIN
since that's a variable thats automatically available to the deployment and will either evaluate to the service's railway domain or a custom domain if applicable so there's no need to hardcode your domain in the start commandseems to be still adding the
;
at the end for some reasonI don't have quite the time to try to reproduce this right now, so... chuck in a string trim instead?
Solution
with simple code that prints each arg out, i was not able to reproduce this
this is something the code is adding, further proven by the semicolon appearing outside of the double quotes, if this was railway adding a semicolon to the last argument thats passed in you would see that semicolon appear within the double quotes