-
Notifications
You must be signed in to change notification settings - Fork 10
Runbook (docker compose)
This runbook is for Ecko installations via docker-compose.
If you run an Ecko instance via docker-compose, bookmark this page. It is meant as one place to quickly find information to rollback or mitigate an issue. It also helps ensure upgrades and migrations are done in a consistent manner.
Update docker image(s)
ssh user@host
cd mastodon # or ecko
docker-compose pull # get new image
docker-compose up -d # recreate containers with new image
watch docker ps # to ensure healthy startup within 30-60 seconds
Migrate db
docker-compose pull
docker-compose run --rm web rails db:migrate
Tootctl commands
docker-compose run --rm web bin/tootctl …
Check media usage
docker-compose run --rm web bin/tootctl media usage
Remove cached media
docker-compose run --rm web bin/tootctl media remove --days=1
Setup process with docker-compose
https://github.com/magicstone-dev/ecko/blob/main/docs/INSTALL_DOCKER_COMPOSE.md
Rollback
If after upgrading docker, you see that one or more services are restarting it's best to rollback as follows.
- Find the previous image you were using with
docker image list
. You should see one that's very recent like in the last few minutes. You want the one before that. - Replace three occurences of
dsterry/ecko:latest
with the IMAGE ID in docker-compose.yml and save the file. The image lines inside the web, sidekiq and streaming services should look like this:
image: 2197b82e5e84
- Run
docker-compose up -d
Get sha256 hash necessary to pull an image:
docker images --digests
or
docker inspect --format='{{index .RepoDigests 0}}' <IMAGE ID>
Prune dangling images
docker image prune -f
Database examination
sudo -u postgres psql ecko_production
\l # show databases
\c ecko_production # use database
\dt # show tables
This wiki contains documentation for ecko - community-driven social network software