diff --git a/Dockerfile b/Dockerfile index 8496d40..882eab3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -167,7 +167,10 @@ COPY docker/nginx/asciinema.conf /etc/nginx/sites-available/default RUN mkdir -p /var/log/supervisor 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" diff --git a/docker/bin/setup b/docker/bin/setup new file mode 100755 index 0000000..ba18ab7 --- /dev/null +++ b/docker/bin/setup @@ -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 8723a83..ea0ccff 100644 --- a/docs/INSTALL.md +++ b/docs/INSTALL.md @@ -120,7 +120,7 @@ Start PostgreSQL container (skip this if you use existing PostgreSQL server): 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