Failed to deploy Ionic Angular app on Railway
francispaulm
FREEOP

2 years 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

francispaulm
FREEOP

2 years ago

Here are the log files


2 years ago

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


francispaulm
FREEOP

2 years ago

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


2 years 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.


2 years 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 almost 2 years ago


francispaulm
FREEOP

2 years ago

Alright ill try this


francispaulm
FREEOP

2 years ago

Thanks, It worked


2 years ago

Awesome, glad to hear that!


Loading...