Skip to content

Commit

Permalink
get access to env variables in after_install
Browse files Browse the repository at this point in the history
  • Loading branch information
fgregg committed Oct 31, 2023
1 parent 90bba7c commit 74bf517
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/after_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ sudo -H -u datamade $VENV_DIR/bin/pip install -r $PROJECT_DIR/requirements.txt -

# OPTIONAL Run migrations and other management commands that should be run with
# every deployment
sudo -H -u datamade bash -c "source $PROJECT_DIR/.env && $VENV_DIR/bin/python $PROJECT_DIR/manage.py migrate"
sudo -H -u datamade bash -c "source $PROJECT_DIR/.env && $VENV_DIR/bin/python $PROJECT_DIR/manage.py createcachetable"
sudo -H -u datamade bash -c "source $PROJECT_DIR/.env && $VENV_DIR/bin/python $PROJECT_DIR/manage.py collectstatic --no-input"
sudo -H -u datamade env $(cat $PROJECT_DIR/.env | xargs) $VENV_DIR/bin/python $PROJECT_DIR/manage.py migrate
sudo -H -u datamade env $(cat $PROJECT_DIR/.env | xargs) $VENV_DIR/bin/python $PROJECT_DIR/manage.py createcachetable
sudo -H -u datamade env $(cat $PROJECT_DIR/.env | xargs) $VENV_DIR/bin/python $PROJECT_DIR/manage.py collectstatic --no-input

# Echo a simple nginx configuration into the correct place, and tell
# certbot to request a cert if one does not already exist.
Expand Down

0 comments on commit 74bf517

Please sign in to comment.