#実現したいこと
docker✖️rails 環境でアプリ作成を行なっています。
その際にデプロイを使用としているのですが、
secret_key_baseの設定が必要とのエラー表示が出てきてしまいます。
下記サイト等を参考にsecret_key_baseの取得はできましたが、
ファイルに設定することができずに困っています。
https://techtechmedia.com/environment-variable-aws/
https://qiita.com/NaokiIshimura/items/2a179f2ab910992c4d39
#発生している問題・エラーメッセージ
docker-compose run api EDITOR="mate --wait" rails credentials:edit --environment production
上記コマンドなど(EDITOR="mate --wait"を入力しない)を実行してもエラーが出てしまいます。
EDITOR=mateをentrypoint.shに追加してみたり、bash_profileの方にコマンドを追加してみたのですがエラーが出てしまいうまく変更できませんでした。
/usr/bin/entrypoint.sh: line 8: exec: EDITOR=mate --wait: not found ERROR: 127
entrypoint.sh
1#!/bin/bash 2set -e 3 4# Remove a potentially pre-existing server.pid for Rails. 5rm -f /myapp/tmp/pids/server.pid 6 7# Then exec the container's main process (what's set as CMD in the Dockerfile). 8exec "$@"```
あなたの回答
tips
プレビュー