diff --git a/Dockerfile b/docker/Dockerfile similarity index 94% rename from Dockerfile rename to docker/Dockerfile index 63022e899..a71b6d7c8 100644 --- a/Dockerfile +++ b/docker/Dockerfile @@ -13,6 +13,6 @@ RUN wget http://github.com/begriffs/postgrest/releases/download/v${POSTGREST_VER # PostgREST reads /etc/postgrest.conf so map the configuration # file in when you run this container -CMD exec postgrest +CMD exec postgrest /etc/postgrest.conf EXPOSE 3000 diff --git a/docker/config.conf b/docker/config.conf new file mode 100644 index 000000000..76db06da7 --- /dev/null +++ b/docker/config.conf @@ -0,0 +1,3 @@ +db-uri = "postgres://app_user:password@postgres:5432/app_db" +db-schema = "public" +db-anon-role = "app_user" diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml new file mode 100644 index 000000000..a1b47027c --- /dev/null +++ b/docker/docker-compose.yml @@ -0,0 +1,17 @@ +stgrest: + image: begriffs/postgrest:latest + ports: + - "3000:3000" + volumes: + - ./config.conf:/etc/postgrest.conf + links: + - postgres:postgres + +postgres: + image: postgres + ports: + - "5432:5432" + environment: + POSTGRES_DB: app_db + POSTGRES_USER: app_user + POSTGRES_PASSWORD: password