Skip to content

Instantly share code, notes, and snippets.

@thsig
Created April 5, 2019 14:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thsig/0d6b804219354a6b73daebff352bcd55 to your computer and use it in GitHub Desktop.
Save thsig/0d6b804219354a6b73daebff352bcd55 to your computer and use it in GitHub Desktop.
Rails example - running rake db:migrate inside a container
$ garden run task db-migrate
Running task db-migrate πŸƒ
βœ” frontend β†’ Getting build status... β†’ Done (took 0.6 sec)
βœ” postgres β†’ Getting build status... β†’ Done (took 0.6 sec)
βœ” postgres β†’ Checking status... β†’ Version v-4bf9f73668 already deployed
βœ” db-migrate β†’ Running β†’ Done (took 4.2 sec)
(0.5ms) SELECT pg_try_advisory_lock(737815420147457505)
↳ /usr/local/bundle/bin/rake:23
(0.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
↳ /usr/local/bundle/bin/rake:23
ActiveRecord::InternalMetadata Load (0.4ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
↳ /usr/local/bundle/bin/rake:23
(0.2ms) BEGIN
↳ /usr/local/bundle/bin/rake:23
(0.2ms) COMMIT
↳ /usr/local/bundle/bin/rake:23
(0.3ms) SELECT pg_advisory_unlock(737815420147457505)
↳ /usr/local/bundle/bin/rake:23
(0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
↳ /usr/local/bundle/bin/rake:23
pod "run-frontend-1554427107793" deleted
Done! βœ”οΈ
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment