-
Notifications
You must be signed in to change notification settings - Fork 49
/
docker-compose.yml
66 lines (61 loc) · 1.99 KB
/
docker-compose.yml
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
version: '3'
services:
################
# postgrest-db #
################
postgrest-db:
container_name: postgrest-db
image: postgres:13-alpine
ports:
- "5432:5432"
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
- DB_ANON_ROLE=${DB_ANON_ROLE}
- DB_SCHEMA=${DB_SCHEMA}
volumes:
# anything in initdb directory is created in the database
# see "How to extend this image" section at https://hub.docker.com/r/_/postgres/
- "./initdb:/docker-entrypoint-initdb.d"
networks:
- postgrest-backend
restart: always
##################
# postgrest-demo #
##################
postgrest-demo:
container_name: postgrest-demo
image: nginx:mainline-alpine
ports:
- "80:80"
volumes:
# anything in html directory is hosted via nginx
- "./html:/usr/share/nginx/html"
restart: always
#############
# postgrest #
#############
postgrest:
container_name: postgrest
image: postgrest/postgrest:latest
ports:
- "3000:3000"
# Available environment variables documented here:
# https://postgrest.org/en/latest/configuration.html#environment-variables
environment:
# The standard connection URI format, documented at
# https://www.postgresql.org/docs/current/static/libpq-connect.html#LIBPQ-CONNSTRING
- PGRST_DB_URI=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgrest-db:5432/${POSTGRES_DB}
# The name of which database schema to expose to REST clients
- PGRST_DB_SCHEMA=${DB_SCHEMA}
# The database role to use when no client authentication is provided
- PGRST_DB_ANON_ROLE=${DB_ANON_ROLE}
# Overrides the base URL used within the OpenAPI self-documentation hosted at the API root path
- PGRST_OPENAPI_SERVER_PROXY_URI=http://localhost:3000
networks:
- postgrest-backend
restart: always
networks:
postgrest-backend:
driver: bridge