R
Railway2mo ago
mffprr

Deploying Web Service, PostGIS and running one-off import

Hi, I'm really bashing my head against this: - I'm using a dockerfile to build my api (Python, FastAPI) - I've setup a postgis/postgis as a DB instance and can now connect successfully after a lot of googling to figure out Private Networking isn't working reliably with alpine even though the docker images at a glance looked to be debian-based. - The same docker build has a secondary script that sets the database up (creates tables etc.), then downloads a dump and finally prepares the data for import into postgresql Now, the issue I'm facing is: - There seems to be no way to connect into either a running container or starting a one-off container (similar to what Heroku does behind the scenes) for me to run the import script. - I managed to kind of hack my way around deploying another service using the same image, and lining ENVs, but since the import script takes a substantial amount of time (15+ minutes) the container was terminated early. Questions: - What options do I have? - It seems lacking not to be able to spin up a temporary pod or run one-offs? - If I have a long-running container with a hard-to-replicate bug in production, how can I debug this without access to the container? While it might be possible to accomplish the above without access to an attaching console or one-off it feels like I'm trying to do a lot of gymnastics to get a simple project going. Other than this, I really like the feel of the UI and what you are doing -- much rather use this than manage K8S myself. Thanks, Martin
6 Replies
Percy
Percy2mo ago
Project ID: d5dd1551-dad6-4314-9774-24a7d7271374
mffprr
mffprrOP2mo ago
d5dd1551-dad6-4314-9774-24a7d7271374
angelo
angelo2mo ago
!t
Duchess
Duchess2mo ago
New reply sent from Help Station thread:
This thread has been escalated to the Railway team.
You're seeing this because this thread has been automatically linked to the Help Station thread. New reply sent from Help Station thread:
First off, thank you for seeing the vision and direction where our product wants to head, I can totally imagine how frustrating it can be where that last 10 percent doesn't take you to where you want to go.Railway doesn't have an easy way to do side-car services (yet) it was something the team just discussed today, nor do we support SSH. I think this might be one of those things where we will have to ask you to open up a thread in https://feedback.railway.app and then we can notify you when those features are ready.
You're seeing this because this thread has been automatically linked to the Help Station thread.
mffprr
mffprrOP2mo ago
Thanks @Duchess -- I've run out of creativity here. Before I switch to something else, is there no one else trying to run database migrations or other commands somehow? Is there another way that I'm just not thinking about?
angelo
angelo2mo ago
That was me! @Angelo So uh- you can try having the migration command as the start command
Want results from more Discord servers?
Add your server