From e4fb85fcf08b6e1f9b0c9611f6513cdbcc9978d7 Mon Sep 17 00:00:00 2001 From: GarPit Date: Sat, 5 Aug 2017 15:13:04 +0300 Subject: [PATCH] update README --- README.md | 52 ++++++++++++++++++++++++++++------------------------ 1 file changed, 28 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index 7db80e4..c4a6e7f 100644 --- a/README.md +++ b/README.md @@ -1,24 +1,28 @@ -# README - -This README would normally document whatever steps are necessary to get the -application up and running. - -Things you may want to cover: - -* Ruby version - -* System dependencies - -* Configuration - -* Database creation - -* Database initialization - -* How to run the test suite - -* Services (job queues, cache servers, search engines, etc.) - -* Deployment instructions - -* ... +Just pull this image, link with Postgres container, create db and migrate in running container and that's it. + +Or let Docker Compose to make this job done (https://github.com/apiqcms/kms_docker/blob/master/docker-compose.yml): + +``` +version: '3' +services: + db: + image: postgres + web: + image: webgradus/kms + command: bundle exec rails s -p 3000 -b '0.0.0.0' + environment: + SECRET_TOKEN: abc + RAILS_SERVE_STATIC_FILES: 'true' + volumes: + - .:/kms + ports: + - "3000:3000" + depends_on: + - db +``` + +Environment variables you should care about are: +* `SECRET_TOKEN` - for secrets.yml +* `RAILS_SERVE_STATIC_FILES` - for serving static files by Rails +* `DATABASE` - database name prefix. Entire name is ENV['DATABASE'] + '_production' +* `POSTGRES_PASSWORD` - which is used for "Postgres" image