Skip to content

Commit

Permalink
Use su instead of sudo when trying to act as the web user
Browse files Browse the repository at this point in the history
  • Loading branch information
WesleyKlop committed Mar 7, 2021
1 parent 7c59893 commit 2dd5ec6
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .docker/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ if [ -z "$APP_KEY" ]; then
exit 1;
fi

sudo -u www-data php artisan config:cache
sudo -u www-data php artisan migrate --force --seed

sudo -u www-data php artisan votesystem:admin
su www-data -s /bin/bash -c '
php artisan config:cache
php artisan migrate --force --seed
php artisan votesystem:admin
'

exec docker-php-entrypoint "$@"

0 comments on commit 2dd5ec6

Please sign in to comment.