-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdocker-compose.pg-trex.yml
More file actions
67 lines (66 loc) · 2.93 KB
/
Copy pathdocker-compose.pg-trex.yml
File metadata and controls
67 lines (66 loc) · 2.93 KB
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
67
volumes:
pg-trex-data:
services:
postgres:
build:
context: .
dockerfile: plugins/pg_trex/Dockerfile
ports:
- 443:443
- 5432:5432
- 65433:5432
- 8001:8001
- 50051:50051
- 7946:7946
command: >
postgres
-c shared_preload_libraries=pg_trex
-c pg_trex.extension_dir=/usr/lib/trexsql/extensions
-c log_min_messages=log
-c ssl=on
-c ssl_cert_file=/var/lib/postgresql/data/server.crt
-c ssl_key_file=/var/lib/postgresql/data/server.key
-c wal_level=logical
-c max_replication_slots=10
-c max_wal_senders=10
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: mypass
POSTGRES_DB: testdb
DATABASE_URL: postgres://postgres:mypass@localhost:5432/testdb
EXTERNAL_DB_URL: postgres://postgres:mypass@trex.local:5432/testdb?sslmode=disable
BETTER_AUTH_SECRET: dev-secret-at-least-32-characters-long!!
BASE_PATH: /trex
BETTER_AUTH_URL: http://localhost:8001/trex
PLUGINS_INFORMATION_URL: "https://feeds.dev.azure.com/data2evidence/d2e/_apis/packaging/Feeds/d2e/packages?api-version=7.1&includeDescription=true"
TPM_REGISTRY_URL: "https://pkgs.dev.azure.com/data2evidence/d2e/_packaging/d2e/npm/registry"
PLUGINS_PATH: /usr/src/plugins
PLUGINS_DEV_PATH: /usr/src/plugins-dev
SCHEMA_DIR: /usr/src/core/schema
SWARM_CONFIG: >-
{"cluster_id":"local","nodes":{"local":{"gossip_addr":"0.0.0.0:7946","extensions":[{"name":"trexas","config":{"host":"0.0.0.0","port":8001,"main_service_path":"/usr/src/core/server","event_worker_path":"/usr/src/core/event","tls_port":443,"tls_cert_path":"/var/lib/postgresql/data/server.crt","tls_key_path":"/var/lib/postgresql/data/server.key"}}]}}}
SWARM_NODE: local
# REST is served in-process by the @trex/postgrest plugin, which
# consumes these PGRST_* values. This stack has no secrets/derived.env,
# so PGRST_JWT_SECRET is the same dev secret as BETTER_AUTH_SECRET.
PGRST_DB_URI: postgres://authenticator:authenticator_pass@postgres:5432/testdb
PGRST_DB_SCHEMAS: public
PGRST_DB_ANON_ROLE: anon
PGRST_JWT_SECRET: dev-secret-at-least-32-characters-long!!
PGRST_DB_PRE_REQUEST: public.postgrest_pre_request
PGRST_OPENAPI_SERVER_PROXY_URI: http://localhost:8001/trex/rest/v1
volumes:
- pg-trex-data:/var/lib/postgresql/data
# - ./core/schema:/usr/src/core/schema
# - ./core/server:/usr/src/core/server
# - ./core/event:/usr/src/core/event
# - ./functions:/usr/src/functions
# - ./plugins/web:/usr/src/plugins-dev/web
# - ./plugins/storage:/usr/src/plugins-dev/storage
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres && psql -U postgres -d testdb -tAc \"SELECT 1 FROM pg_roles WHERE rolname='authenticator' AND rolcanlogin\" | grep -q 1"]
interval: 5s
timeout: 5s
retries: 20
shm_size: 256mb
stop_grace_period: 10s