I have deployed a FastAPI server and a RQ Worker in separate containers on Railway based on the same monorepo: https://github.com/kristiankauffeld/fastapi-redis
The repo is structured by separating the services into different directories where they have their own Dockerfile. The two services communicate through a Redis instance.
Currently there is some code duplication since I have copied the "utils" folder both into the "api" and the "rq-worker" folder. So if anyone perhaps could share some insight whether there is a better approach to deploy an application like this.
Thanks