Spaces:
Sleeping
Sleeping
Fix credentials generation to use Rails runner
Browse files- bin/start.sh +1 -3
bin/start.sh
CHANGED
|
@@ -11,9 +11,7 @@ echo "[container] Preparing startup checks..."
|
|
| 11 |
# so Rails boot doesn't fail when looking for credentials.yml.enc
|
| 12 |
if [ ! -f config/credentials.yml.enc ]; then
|
| 13 |
echo "[container] Generating empty encrypted credentials..."
|
| 14 |
-
bundle exec rails credentials
|
| 15 |
-
|
| 16 |
-
EOF
|
| 17 |
fi
|
| 18 |
|
| 19 |
# If encrypted credentials are present, validate RAILS_MASTER_KEY before running DB/assets tasks.
|
|
|
|
| 11 |
# so Rails boot doesn't fail when looking for credentials.yml.enc
|
| 12 |
if [ ! -f config/credentials.yml.enc ]; then
|
| 13 |
echo "[container] Generating empty encrypted credentials..."
|
| 14 |
+
bundle exec rails runner "Rails.application.encrypted('config/credentials.yml.enc').change { {} }" || true
|
|
|
|
|
|
|
| 15 |
fi
|
| 16 |
|
| 17 |
# If encrypted credentials are present, validate RAILS_MASTER_KEY before running DB/assets tasks.
|