Correct way to invoke a pre-deploy script
shxkm
PROOP

a year ago

Deploying a dockerized Django app (Dockerfile). I need to execute a Python script at src/manage.py before invoking the entry point. Having a hard time understanding how to do that. I tried:

./src/manage.py migrate

Solved

5 Replies

shxkm
PROOP

a year ago

1b0d51d3-f173-4fd6-bf29-f0025eae2d1a


a year ago

You should be executing your migration script as a pre deploy step, you can add the step in a service's settings. If you're having trouble finding the file path, it may be helpful to add an ls command to that step to visualize the cwd in the project structure


shxkm
PROOP

a year ago

Yep. That was my problem. One issue is that the step did not emit any logs the first time.


shxkm
PROOP

a year ago

This can be marked as solved


a year ago

!s


Status changed to Solved adam about 1 year ago


Loading...