Can I build a separate image/container for other devices to use?

  • Assuming all configurations remain unchanged (build and start the same)
  • To accelerate the construction process I hope to build an image on a dedicated packaging server and upload it to Harbor, then download it before using the pre built image to reduce compilation time
  • May I ask if there are any relevant tutorials that can be implemented in this way? Or can it be implemented on its own but there is no official support and it needs to be explored on its own?

I think the Discourse team does something like that for their hosted product, so you can get your forum up with them within minutes (it would be really inefficient if the user has to wait for everything to install, right?). I don’t think there’s Documentation for this, though.

I’m not aware of a guide, but basically, you do a bootstrap, push that image to your repo, and then use ./launcher start-cmd to get the required ENV to crank up the container.

At some point you need to migate the database (if you want a zero-downtime deployment, you want to know about SKIP_POST_DEPLOYMENT_MIGRATIONS to enable you to migrate the database while the old container runs and rake db:ensure_post_migrations db:migrate after it’s launched. You also need to precompile assets and, if you’re using S3, push them there.

That’s at least most of the Discourse-specific pieces. If you would like more help and have a budget, I’m available.

2 Likes