Sha256: c96a5aaa0a332196c9046e4409911e28812843be8d500a962fce766abf77c5be
Contents?: true
Size: 472 Bytes
Versions: 2
Compression:
Stored size: 472 Bytes
Contents
namespace :dockerci do desc 'start mysql docker' task :mysql do db_config = Rails.configuration.database_configuration db_name = db_config.dig('development', 'database') cmd = %w[docker run -d -p 3306:3306] cmd += ['--name', db_name] cmd += ['-e', "MYSQL_DATABASE=#{db_name}"] img_name = 'circleci/mysql' tag = Rails.application.config.dockerci_mysql_version img_name += ':' + tag if tag cmd << img_name exec(*cmd) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
dockerci-0.1.1 | lib/dockerci/railtie/dockerci.rake |
dockerci-0.1.0 | lib/dockerci/railtie/dockerci.rake |