mffprr
mffprr
RRailway
Created by mffprr on 9/25/2024 in #✋|help
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
9 replies