我从灌肠机迁移到AWS代码,部署到自动部署我的Laravel应用程序。
因此,我将其添加到我的afterInstall脚本中:
cd /project directory
composer install
if [ -f artisan ]
then
php artisan migrate --force
fi
if [ -f artisan ]
then
php artisan config:cache
php artisan queue:restart
fi但部署失败时出现了此错误。
在指定位置运行MessageScript /post-install.sh作为用户用户运行失败,退出代码1日志TailLifecycleEvent - AfterInstall脚本-脚本/-install.sh stderrNo passwd条目为用户“用户”
这很奇怪。我创建的AMI实例已经具有默认的用户登录名和求婚者一样的ubuntu
grep -Po '^sudo.+:\K.*$' /etc/group
ubuntu,forge那它为什么要密码呢?
发布于 2018-08-02 05:06:50
我必须更改appspec文件中的runAs部分。
in the script specified in "location".
AfterInstall:
- location: scripts/after-install.sh
runas: forge // used to be 'user'https://stackoverflow.com/questions/51645339
复制相似问题