Shift Happens
Technology
Run migrations on Dokku/Heroku deployment
We at Firmhouse are currently moving our projects over to a new version of Intercity, which is using Dokku as its backend. Dokku is a "Docker powered...
Written by
Jeroen van Baarsen
Published
We at Firmhouse are currently moving our projects over to a new version of Intercity, which is using Dokku as its backend. Dokku is a "Docker powered mini-Heroku", this means you can deploy your code by doing a Git push.
One thing that we miss in Dokku is a way to have "After-deploy" hooks to run migrations on deployment. This means that after you deployed, you need to manually run the migrations on your server; this is annoying and error prone!
When inspecting the way Dokku deploys its code, we see that it is using the Heroku buildpacks on the background. Heroku runs the asset precompilation task in the Deploy cycle, and since this is a Rake task, we can hook into this!
By creating the following file, we can run all migrations after the asset compilation task.
At first, this felt like a hack, but after using this method for over a month, I start to really like this!
If you have questions about this, ping me on Twitter (@jvanbaarsen), or send me an email
Keep reading

Technology
Why local payment methods matter for scaling recurring commerce across Europe
European customers who can pay with their preferred methods complete purchases more often and feel better about their shopping experience. This local touch helps customers feel at home during checkout—essential for subscription models that depend on long-term relationships.
Deidre Olsen
·

Technology
Seamless integration: Transforming customer experience with unified commerce
With a unified commerce strategy, merchants can transcend omnichannel limitations, resulting in personalized customer journeys, optimized order fulfillment, and flexible payment and delivery options.
Deidre Olsen
·

Technology
Embracing Digital Transformation With As-A-Service Models
Digitalization has changed not only technology but the way we do business nowadays. Learn how the trend for businesses has been moving in the direction of as-a-service models.
Cristina Quijano
·