diff --git a/.gitlab-ci.deploy.yml b/.gitlab-ci.deploy.yml index 85d850c..7815618 100644 --- a/.gitlab-ci.deploy.yml +++ b/.gitlab-ci.deploy.yml @@ -20,7 +20,7 @@ my.makepostsell.com: script: # publish build to Salt Master - sudo /opt/salt-call-state-highstate.sh - # run pending database migrations - - /opt/make_post_sell/env/bin/alembic -c /opt/make_post_sell/production.ini upgrade head + # run pending database migrations as the app user + - sudo -u uwsgi /opt/make_post_sell/env/bin/alembic -c /opt/make_post_sell/production.ini upgrade head rules: - if: '$CI_COMMIT_BRANCH == "master"'