hatamo commited on
Commit
5cdaa9e
·
1 Parent(s): 04be373

Fix credentials generation to use Rails runner

Browse files
Files changed (1) hide show
  1. 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:edit --enroll-mfa=false <<EOF
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.