Read settings from config file (#714)
This commit is contained in:
+4
-13
@@ -1,11 +1,6 @@
|
||||
FROM debian:jessie
|
||||
|
||||
ENV POSTGREST_VERSION 0.3.2.0
|
||||
ENV POSTGREST_SCHEMA public
|
||||
ENV POSTGREST_ANONYMOUS postgres
|
||||
ENV POSTGREST_JWT_SECRET thisisnotarealsecret
|
||||
ENV POSTGREST_MAX_ROWS 1000000
|
||||
ENV POSTGREST_POOL 200
|
||||
ENV POSTGREST_VERSION 0.4.0.0
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y tar xz-utils wget libpq-dev && \
|
||||
@@ -16,12 +11,8 @@ RUN wget http://github.com/begriffs/postgrest/releases/download/v${POSTGREST_VER
|
||||
mv postgrest /usr/local/bin/postgrest && \
|
||||
rm postgrest-${POSTGREST_VERSION}-ubuntu.tar.xz
|
||||
|
||||
CMD exec postgrest postgres://${PG_ENV_POSTGRES_USER}:${PG_ENV_POSTGRES_PASSWORD}@${PG_PORT_5432_TCP_ADDR}:${PG_PORT_5432_TCP_PORT}/${PG_ENV_POSTGRES_DB} \
|
||||
--port 3000 \
|
||||
--schema ${POSTGREST_SCHEMA} \
|
||||
--anonymous ${POSTGREST_ANONYMOUS} \
|
||||
--pool ${POSTGREST_POOL} \
|
||||
--jwt-secret ${POSTGREST_JWT_SECRET} \
|
||||
--max-rows ${POSTGREST_MAX_ROWS}
|
||||
# PostgREST reads /etc/postgrest.conf so map the configuration
|
||||
# file in when you run this container
|
||||
CMD exec postgrest
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
Reference in New Issue
Block a user