bookwyrm icon indicating copy to clipboard operation
bookwyrm copied to clipboard

building / publishing generic Docker images

Open magnus919 opened this issue 2 years ago • 3 comments

Is your feature request related to a problem? Please describe. This seems a convention with a few Fediverse apps, but I'm noticing the Docker instructions include setting up environment variables and then having the user build their own container images rather than pulling generic images and externalizing environment. This could really boost participation and hosting of more instances!

Describe the solution you'd like

  • Publish regular tagged container images as part of build process to Docker Hub.
  • Amend documentation to avoid end users having to build, and instead shift toward consuming these images (I think I can help figure out this part).

Describe alternatives you've considered I could follow the Docker deployment instructions as-provided, but it would be super weird in my setup. Also the way these are (not) provided now means it can't be deployed to K8s without extra work.

Additional context Not sure how much I can help with sorting out a generically consumable image build (I'd like to help). But I am pretty sure I can help out with consumption doc.

magnus919 avatar May 03 '22 01:05 magnus919

Just expounding a bit...

Generic Docker images would free end users up to easily deploy to Docker, Docker Swarm, Kubernetes, CloudFoundry, OpenShift, and probably other container platforms I'm not considering.

magnus919 avatar May 03 '22 01:05 magnus919

💯 to this! I was actually looking to spin up an instance but dismayed to find prebuilt packages aren't available.

I've done this for a few of my own repos, so for automated docker builds I'd suggest leveraging your existing GitHub Actions to incorporate this :octocat:-made one: https://github.com/marketplace/actions/build-and-push-docker-images

You can probably host the prebuilt images here, but the defacto seems to be hosting with Docker Hub. It should be easy to create an official BookWyrm org there and have each image be it's own repo. If you have access to a paid Docker account, you can skip GitHub entirely and just use their automated builds.

I'll also add as I see this a lot with OSS Docker images: please support Docker+K8S secrets! It's easy to pass in env vars for sensitive data, but storing that info in either a .env or a docker-compose file isn't as secure. It may not make sense for a standalone setup, but if you have a k8s or Swarm setup already it would be nice.

ChaosExAnima avatar May 14 '22 19:05 ChaosExAnima

Came here to post issue about that.

For me it's also quite strange deployment because I write my own stacks and often reuse commonly available PostgreSQL, Redis, etc among them. This way I have centralized database backups and other benefits like being able to have single PostgreSQL with LARGE caches for fast queries.

I'm not sure if current Docker deployment should be removed from documentation entirely, but I'd opt for publicly available official images if it was possible.

So I completely support this issue. Unfortunately I'm not able to contribute on that because I'm not familiar with Python and Django stack.

skobkin avatar Jan 06 '24 23:01 skobkin