Failed to deploy Ionic Angular app on Railway

francispaulmHOBBY

a year ago

Im new to using railway and I've tried deploying and ionic angular app on railway but it fails. The app runs fine on local but seems to fail when I try deploying. Building phase returns no error but the deploy fails.

Solved

8 Replies

francispaulmHOBBY

a year ago

Here are the log files


a year ago

You are trying to run a development server. I have a few examples for angular, what version of angular are you using?


francispaulmHOBBY

a year ago

Im using Angular 17 with ionic 7, Could you explain what Im doing wrong


a year ago

Angular doesn't come with a production-ready web server, and Railway will only ever run your code as-is, therefore a development server is what gets run.

I'll see about getting an Angular 17 and Ionic project up and running properly on Railway.


a year ago

Here's an Ionic and Angular project that will deploy properly to Railway and comes set up with an actual web server -

https://github.com/brody192/angular-ionic-template

The only things you should need to do would be to copy the nixpacks.toml and Caddyfile from that repository into yours, and if you have any custom build or start commands set in your Railway service settings, remove them.

Let me know if you run into further difficulties. Or open a new thread if you need additional help!


Status changed to Solved railway[bot] about 1 year ago


francispaulmHOBBY

a year ago

Alright ill try this


francispaulmHOBBY

a year ago

Thanks, It worked


a year ago

Awesome, glad to hear that!


Failed to deploy Ionic Angular app on Railway - Railway Help Station