docs: Add Docker install guide #348
Loading…
Reference in a new issue
No description provided.
Delete branch "docs/docker"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Based on Misskey's Docker guide:
https://github.com/misskey-dev/misskey-hub/blob/main/src/en/docs/install/docker.md
May need some more changes to make it work better for FoundKey, so it's WIP for now.
Some changes that need to be changed inside the default.yml when using Docker is setting the database host to
db
and the redis host toredis
so that it uses the internal container network to connect over to those containers.I'm not amazing at wording things so if someone wants to make this understandable inside the document, that'd be amazing.
Aside from that, setting up Foundkey like anything else, it will just compile the container, build Foundkey and start the instance with a simple
docker-compose up -d
, there's no need to do anything else between editing configs and this.Might be worth stating that you can use
docker-compose logs -f
to monitor the output of the containers in cases of issues.Wondering if I should move
docker-compose.yml
todocker-compose.yml.example
so that it matches with the docs...@ -0,0 +63,4 @@
git pull
git stash pop
docker compose build
docker compose stop && docker compose up -d
docker compose stop
will just stop the container instead of removing it. In this case, it will causedocker compose up -d
to just restart the stopped container which will still use the previous image, rather than start a new container with the updated image.As the postgres database uses a volume to load the database directory into the container, this poses virtually no risk but it might be worth advising the user to ensure they're keeping good backups. Redis is memory based so nothing should be stored to disk in this case too.
What would be the more appropriate command to rebuild the containers? Thinking of using
docker compose up --force-recreate --build -d
...Just simply switching out
stop
todown
would be fine here. Keeping the build process as a seperate command is a nice feature here as you can be rebuilding the Foundkey image whilst the instance is still online without impacting the currently running instance (aside from CPU and Memory resources).Then doing a
docker compose down && docker compose up -d
will take the instance offline, delete the current container and then start up a new container on the new image.Most projects I come across that have the option to run the service in Docker will just keep the file as
docker-compose.yml
, you'd usually store it as an example file if it's going to require modification before being usable. In this case however, as long as the configs have been changed correctly, it will just work.Just my 2 cents on this.
41ca522faa
to8700f5b5db
WIP: docs: Add Docker install guideto docs: Add Docker install guideThese instructions should work now. Would appreciate testing from others or any sort of suggestions for improving this guide.
I'd maybe add something about migrating to podman after installing, but idk how needed/difficult that is, and probably would be a separate page anyway.
and of course instead of pulling and stashing, I fetch and rebase, but I guess that's personal preference
I personally think switching between podman and docker would be out of scope for this doc. There probably are resources out there that can help with that, but maybe I could add it at a later date once I get familiar with that process.
Gonna just stick to pull/stash for now since it's close to how the main install guide does it (though it might be changed to what #117 proposes if that gets merged)
e78d67e9c7
to5662635d45
da246ce419