Slackbot
03/14/2023, 2:50 PMAndrew Kirkpatrick
03/14/2023, 3:09 PMPostStart
hook on the PostgreSQL container in the Pod that waits for Postgres to become available, then loads the SQL dump. Then have the Flask container readiness
check wait for the data to be imported before allowing request through (not the best way)
Other (simple) way you could do it is use 2 Pods (1 for Postgres, 1 for Flask) and use an initContainer
in the Flask Pod that waits for Postgres to become available, then loads the SQL dump in it's entirety before Flask starts.
(there are various different/better ways to do it, but those might be sufficient?)Anthony Ezeabasili
03/15/2023, 7:40 PMscripts
approach to solve, i also had to run the different applications in separate pods