【发布时间】:2019-07-06 01:02:41
【问题描述】:
我想从 credstash 设置的 Elastic Beanstalk 环境变量存在一些问题。
option_settings:
- namespace: aws:elasticbeanstalk:application:environment
option_name: SECRET_KEY_BASE
value: $(credstash --region eu-west-1 -t credstash get test.secret_key_base)
我已经指定 credstash 应该从 Python 安装:
packages:
python:
credstash: []
但是,当我部署资产时,预编译失败 (rake assets:precompile)。
EB 运行状况页面显示应用程序部署失败。
/opt/elasticbeanstalk/support/envvars: line 5: credstash: command not found
...
+ su -s /bin/bash -c 'bundle exec rake assets:precompile' webapp
`/home/webapp` is not a directory.
Bundler will use `/tmp/bundler/home/webapp' as your home directory temporarily.
rake aborted!
ArgumentError: `secret_key_base` for production environment must be a type of String`
secret_key_base 在secrets.yml 中设置为ENV['SECRET_KEY_BASE'],因此它应该包含来自 credstash 的值。但是,由于credstash: command not found 的输出,我猜测 credstash 没有安装或由于某种原因不在路径上。
有人知道这里会发生什么吗?
【问题讨论】:
标签: ruby-on-rails amazon-web-services amazon-elastic-beanstalk credstash