Container Docker to run Active Record 5 migrations without a Rails application.
10K+
migrate:
image: webgoal/standalone-migrations
volumes:
- ./db:/opt/migrations/db
As in the example you must have a 'db' folder in the same directory
development:
adapter: mysql2
encoding: utf8
database: database_development
username: user
password: pass
host: 192.168.1.2
production:
adapter: mysql2
encoding: utf8
database: database_production
username: user
password: pass
host: 192.168.1.3
docker-compose run db mysql -hdb -pmypass database_development < ./db/structure.sql
docker-compose run migrate rake db:new_migration name="migration_name"
docker-compose run migrate rake db:migrate
docker-compose run -e RAILS_ENV='production' migrate rake db:migrate
Content type
Image
Digest
Size
318.8 MB
Last updated
over 8 years ago
docker pull singingcode/standalone-migrations