forked from OpenCatalogi/opencatalogi
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdocker-compose.demo.yml
More file actions
136 lines (131 loc) · 4.66 KB
/
Copy pathdocker-compose.demo.yml
File metadata and controls
136 lines (131 loc) · 4.66 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
# Docker Compose for the OpenCatalogi demo portal
#
# One command brings up a Rotterdam-themed public portal that searches
# publications across TWO catalogues:
#
# docker compose -f docker-compose.demo.yml up -d
# bash docker/demo/provision.sh
#
# Then open http://localhost:8580/index.php/apps/portaliq/site
#
# WHY TWO INSTANCES
# -----------------
# Because one cannot demonstrate federation. The production directory at
# directory.opencatalogi.nl answers `{"results":[],"total":0}` — measured
# 2026-08-20 — so an instance federating with it syncs successfully and
# receives nothing, and a portal reading it shows an empty list that is
# indistinguishable from a broken install.
#
# `demo-peer` is a second, independent catalogue with its own publications.
# `demo-main` discovers it, syncs from it, and its portal renders results that
# NAME the peer they came from. That makes federation observable rather than
# asserted, and it works with no network access at all.
#
# Ports: 8580 (portal instance), 8581 (peer catalogue). Chosen clear of the
# dev environment (8080), the federation test rig (9081/9082) and the e2e rigs
# in the 8090–8500 range. The database has NO host port — nothing outside this
# compose needs it, and binding one is how two rigs collide.
#
# Teardown, including the seeded data:
# docker compose -f docker-compose.demo.yml down -v
volumes:
demo-main:
demo-peer:
demo-db:
networks:
opencatalogi-demo:
name: opencatalogi-demo
driver: bridge
services:
demo-db:
container_name: oc-demo-db
image: pgvector/pgvector:pg16
restart: "no"
environment:
- POSTGRES_USER=nextcloud
- POSTGRES_PASSWORD=demo
- POSTGRES_DB=main
volumes:
- demo-db:/var/lib/postgresql/data
- ./docker/demo/init-databases.sql:/docker-entrypoint-initdb.d/01-init-databases.sql:ro
networks:
- opencatalogi-demo
healthcheck:
test: ["CMD-SHELL", "pg_isready -U nextcloud -d main"]
interval: 5s
timeout: 3s
retries: 20
# The portal instance: OpenRegister + OpenCatalogi + Portaliq + NLDesign.
# This is the one a visitor opens.
demo-main:
user: root
container_name: oc-demo-main
image: nextcloud:34.0.0-apache
restart: "no"
ports:
- "8580:80"
depends_on:
demo-db:
condition: service_healthy
volumes:
- demo-main:/var/www/html:rw
# App paths are overridable so the rig can run against a checkout, a
# worktree or a release tarball without editing this file.
- ${OPENREGISTER_PATH:-../openregister}:/var/www/html/custom_apps/openregister
- ${PORTALIQ_PATH:-../portaliq}:/var/www/html/custom_apps/portaliq
- ${NLDESIGN_PATH:-../nldesign}:/var/www/html/custom_apps/nldesign
- .:/var/www/html/custom_apps/opencatalogi
environment:
- POSTGRES_DB=main
- POSTGRES_USER=nextcloud
- POSTGRES_PASSWORD=demo
- POSTGRES_HOST=demo-db
- NEXTCLOUD_ADMIN_USER=admin
- NEXTCLOUD_ADMIN_PASSWORD=admin
# The peer is reached by its container name from inside the network and
# by localhost:8581 from the host. Both are trusted so that a redirect
# or a generated URL is not rewritten to something unreachable.
- NEXTCLOUD_TRUSTED_DOMAINS=localhost oc-demo-main demo-main
- PHP_MEMORY_LIMIT=1G
networks:
- opencatalogi-demo
healthcheck:
test: ["CMD-SHELL", "curl -sf http://localhost/status.php | grep -q '\"installed\":true' || exit 1"]
interval: 10s
timeout: 5s
retries: 40
start_period: 60s
# The peer catalogue. OpenCatalogi + OpenRegister only — it publishes, it
# does not render a portal. Deliberately NOT running portaliq, so that a
# result appearing on the main portal can only have arrived by federation.
demo-peer:
user: root
container_name: oc-demo-peer
image: nextcloud:34.0.0-apache
restart: "no"
ports:
- "8581:80"
depends_on:
demo-db:
condition: service_healthy
volumes:
- demo-peer:/var/www/html:rw
- ${OPENREGISTER_PATH:-../openregister}:/var/www/html/custom_apps/openregister
- .:/var/www/html/custom_apps/opencatalogi
environment:
- POSTGRES_DB=peer
- POSTGRES_USER=nextcloud
- POSTGRES_PASSWORD=demo
- POSTGRES_HOST=demo-db
- NEXTCLOUD_ADMIN_USER=admin
- NEXTCLOUD_ADMIN_PASSWORD=admin
- NEXTCLOUD_TRUSTED_DOMAINS=localhost oc-demo-peer demo-peer
- PHP_MEMORY_LIMIT=1G
networks:
- opencatalogi-demo
healthcheck:
test: ["CMD-SHELL", "curl -sf http://localhost/status.php | grep -q '\"installed\":true' || exit 1"]
interval: 10s
timeout: 5s
retries: 40
start_period: 60s