Compare commits

...

2 Commits

Author SHA1 Message Date
Marcin Kulik ff35ad05f6 Add upgrade instructions 7 years ago
Marcin Kulik 92b03bb3f7 Use bash script for setup 7 years ago

@ -167,7 +167,10 @@ COPY docker/nginx/asciinema.conf /etc/nginx/sites-available/default
RUN mkdir -p /var/log/supervisor RUN mkdir -p /var/log/supervisor
COPY docker/supervisor/asciinema.conf /etc/supervisor/conf.d/asciinema.conf COPY docker/supervisor/asciinema.conf /etc/supervisor/conf.d/asciinema.conf
# add start script for Clojure app # add setup script
COPY docker/bin /app/docker/bin
ENV PATH "/app/docker/bin:${PATH}"
ENV A2PNG_BIN_PATH "/app/a2png/a2png.sh" ENV A2PNG_BIN_PATH "/app/a2png/a2png.sh"

@ -0,0 +1,6 @@
#!/usr/bin/env bash
set -e
bundle exec rake db:migrate
bundle exec rake db:seed

@ -0,0 +1,6 @@
#!/usr/bin/env bash
set -e
bundle exec rake db:migrate
bundle exec rake db:seed

@ -57,6 +57,11 @@ docker-compose configuration.
git clone --recursive https://github.com/asciinema/asciinema.org.git 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 ### Edit config file
You need to create `.env.production` config file. The easiest is to use You need to create `.env.production` config file. The easiest is to use
@ -120,7 +125,7 @@ Start PostgreSQL container (skip this if you use existing PostgreSQL server):
Create database schema and seed it with initial data: Create database schema and seed it with initial data:
docker-compose run --rm web bundle exec rake db:setup docker-compose run --rm web setup
### Create containers ### Create containers
@ -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! 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 ## Using asciinema recorder with your instance
Once you have your instance running, point asciinema recorder to it by setting Once you have your instance running, point asciinema recorder to it by setting

Loading…
Cancel
Save