diff --git a/docker/bin/upgrade b/docker/bin/upgrade new file mode 100755 index 0000000..ba18ab7 --- /dev/null +++ b/docker/bin/upgrade @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +set -e + +bundle exec rake db:migrate +bundle exec rake db:seed \ No newline at end of file diff --git a/docs/INSTALL.md b/docs/INSTALL.md index ea0ccff..e2066a6 100644 --- a/docs/INSTALL.md +++ b/docs/INSTALL.md @@ -57,6 +57,11 @@ docker-compose configuration. git clone --recursive https://github.com/asciinema/asciinema.org.git +It's recommended to checkout a new branch, to keep any customizations separate +from master branch and make upgrading safer: + + git checkout -b example + ### Edit config file You need to create `.env.production` config file. The easiest is to use @@ -136,6 +141,25 @@ You should see `asciinema_web`, `asciinema_postgres` and a few others listed. Point your browser to `BASE_URL` and enjoy your own asciinema hosting site! +## Upgrading + +Stop all containers: + + docker-compose stop + +Pull latest code from upstream and merge it into your branch: + + git fetch origin + git merge origin/master + +Upgrade database: + + docker-compose run --rm web upgrade + +Start new containers: + + docker-compose up -d + ## Using asciinema recorder with your instance Once you have your instance running, point asciinema recorder to it by setting