diff options
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 |
