blob: d167bb4530a59185f7d91e4500535bc2b1bea99f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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
|