Permalink
Browse files

environments: do not migrate by default

The migration part is now expected to be done by the administrator. This
is done automatically by the init script in containerized deployments.

This was done because now we had at least two portus processes accessing
the DB and trying to migrate the DB, which caused quite some issues.
Moreover, notice that the previous workflow (e.g. automatically
migrating on production) was simply not possible in orchestration
solutions like Docker Swarm or Kubernetes.

Signed-off-by: Miquel Sabaté Solà <msabate@suse.com>
  • Loading branch information...
mssola committed Jan 12, 2018
1 parent 5e1932c commit 1c4d2b6cf0e09e3be770a0675a42ee23cd2f62dd

This file was deleted.

Oops, something went wrong.
@@ -84,8 +84,4 @@
# Do not dump schema after migrations.
config.active_record.dump_schema_after_migration = false
# Run pending migrations
require_relative "helpers/migrate"
run_migration!(config)
end
@@ -95,8 +95,7 @@ bundle install --retry=3 --local --deployment --without assets test development
gem.ruby2.4 install --no-rdoc --no-ri --install-dir vendor/bundle/ruby/%{rb_ver}/ vendor/cache/bundler-*.gem
# Compile assets
SKIP_MIGRATION="yes" \
PORTUS_SECRET_KEY_BASE="ap" PORTUS_KEY_PATH="ap" PORTUS_PASSWORD="ap" \
PORTUS_SECRET_KEY_BASE="ap" PORTUS_KEY_PATH="ap" PORTUS_PASSWORD="ap" \
RAILS_ENV=production NODE_ENV=production \
bundle exec rake portus:assets:compile
@@ -116,7 +116,6 @@ def create_database
Runner.activate_service("mysql") if database_local?
env_variables = {
"SKIP_MIGRATION" => "yes",
"PORTUS_PASSWORD" => @portus_password
}
puts "Creating Portus' database"

0 comments on commit 1c4d2b6

Please sign in to comment.