diff options
| author | Jan Tuomi <jan.tuomi@eficode.com> | 2020-04-26 16:40:34 +0300 |
|---|---|---|
| committer | Jan Tuomi <jan.tuomi@eficode.com> | 2020-04-26 16:40:34 +0300 |
| commit | 449ebe5164ad9d2ba1e7d61bbae8e4101b703490 (patch) | |
| tree | e334b1bd0f0999da9cfd36d0502578b2cac102af /README.md | |
| parent | 55f725a502011155f0943f2340ef3763f014ccc0 (diff) | |
Stuff
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..d167bb4 --- /dev/null +++ b/README.md @@ -0,0 +1,40 @@ +# PostgREST system demo + +# Installation + +* Run +``` +$ docker-compose build +``` + +* Create file `.env` with all variables required in `docker-compose.yml`. +* Set up `authenticator` user role in the database by running + +``` +$ docker-compose run --rm postgrest_api bash -c " + PGPASSWORD=postgres psql -h postgres -U postgres -c \"\ + create role authenticator noinherit login password '${POSTGREST_PASSWORD}' + \" +" +``` + +# Running migrations + +Migration files live under `postgrest/migrations`. Run them all with +``` +$ docker-compose run --rm postgrest_api bash -c ' +for sqlfile in migrations/*.sql +do + echo Migrating ${sqlfile}... + PGPASSWORD=postgres psql -U postgres -h postgres < ${sqlfile} +done' +``` + +# Launching services + +* Run +``` +$ docker-compose up +``` + +Copyright Jan Tuomi 2020
\ No newline at end of file |
