How to disable Dockerfile in a service?
nahasco
HOBBYOP

2 years ago

So I have multiple services including Django and Celery. Both use the same code but their start commands should be different.

Since I am using a Dockerfile to build and start my Django service, it is automatically detected and applied to the celery service too.

I want my celery service to have a different start command but railway is forcing the dockerfile on both.

How to fix that?

25 Replies

nahasco
HOBBYOP

2 years ago

643c9962-5fa0-449c-82e0-67b30f66c552


nahasco
HOBBYOP

2 years ago

This is my docker file.

I tried removing the start commands and placing them manually in the railway dashbaord as a custom start command but it didnt deploy, the logs were empty.

I think there is an issue with paths?

1269648830912008252


nahasco
HOBBYOP

2 years ago

Any solution to this?


2 years ago

simply set the needed start command in the service settings


nahasco
HOBBYOP

2 years ago

When I do that nothing gets deployed


2 years ago

please go back to that and then we can debug from there


nahasco
HOBBYOP

2 years ago

just did that


2 years ago

and what errors are you getting?


nahasco
HOBBYOP

2 years ago

the deploy logs are empty


2 years ago

what have you set the start command to?


nahasco
HOBBYOP

2 years ago

sleep 3 && celery -A tibianbackend worker -l INFO --concurrency=2 workerprefetch_multiplier=1


nahasco
HOBBYOP

2 years ago

had the same issue before wiht my other service, defining a start command causes the service not to start at all


nahasco
HOBBYOP

2 years ago

when having a docker file


nahasco
HOBBYOP

2 years ago

another thing i wanna mention is that i tried making 2 nixpack config files and defining them in the service settings separately, each with a different start command, however railway didnt pick up on them and decided to build on the default builder config


nahasco
HOBBYOP

2 years ago

been a headache honestly i hope there is a solution to all this


2 years ago

remove the sleep 3 &&


2 years ago

as long as you are on the V2 runtime there is no need for a sleep


nahasco
HOBBYOP

2 years ago

got something this time

Starting Container

container event container died

similar situation to my django service earlier, like i mentioned


2 years ago

I'll look at your project when I'm back on my computer to see if something else has been missconfigured


2 years ago

the last changes made to the celery service was 6 hours ago???


2 years ago

the django fail from ~1h ago was likely because you ran railway up from the wrong dir


nahasco
HOBBYOP

2 years ago

i think youre looking at production and not staging


nahasco
HOBBYOP

2 years ago

im testing on staging environment


2 years ago

ah my bad, I don't think an environment was mentioned? will look at staging


2 years ago

hey, sorry for the delay here but im not seeing any issues with the services in staging? django is running correctly and so is celery, both service logs reflect this?


Loading...