Commit 936927bd authored by mh's avatar mh

make sure we run db:setup only if we do currently not have any db versions,...

make sure we run db:setup only if we do currently not have any db versions, aka. we already migrated once, otherwise we would wipe the db, by using db:setup
parent c45307fc
......@@ -28,6 +28,7 @@ class schleuder::web(
command => "scl enable rh-${ruby_scl} 'bundle exec rake db:setup RAILS_ENV=production SCHLEUDER_TLS_FINGERPRINT=stubvalue SCHLEUDER_API_KEY=stubvalue SECRET_KEY_BASE=stubvalue SCHLEUDER_API_HOST=somehost SCHLEUDER_WEB_HOSTNAME=somehost'",
cwd => '/var/www/schleuder-web',
refreshonly => true,
onlyif => "scl enable rh-${ruby_scl} 'bundle exec rake db:version RAILS_ENV=production SCHLEUDER_TLS_FINGERPRINT=stubvalue SCHLEUDER_API_KEY=stubvalue SECRET_KEY_BASE=stubvalue SCHLEUDER_API_HOST=somehost SCHLEUDER_WEB_HOSTNAME=somehost' | grep -E '^Current version: 0\$'",
user => 'schleuder-web',
group => 'schleuder-web',
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment