Skip to content

Commit

Permalink
Adding a very early piece of documentation so that I can edit it to r…
Browse files Browse the repository at this point in the history
…eflect

the config for v1.2.0
  • Loading branch information
Mike Lynch authored and Mike Lynch committed Feb 4, 2020
1 parent 5a797e3 commit 9f4bbb3
Show file tree
Hide file tree
Showing 2 changed files with 81 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,16 @@ Components: a solr container and an nginx-ocfl container.

## Roadmap

### Automated test

### Versions

Put a proper test framework around versioning.

Expose versions to the web using a protocol such as memento

### node.js

A variant which uses the same javascript but in a node.js/express app rather than an nginx


76 changes: 76 additions & 0 deletions doc/ocfl-nginx.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
OCFL-nginx
==========

(Documenting this before I write it)


## ocfl.conf

Sample config for a server with two ocfl repositories in the same nginx root:

/etc/share/nginx/html/myrepo1_ocfl
/etc/share/nginx/html/myrepo2_ocfl

Each repo has been indexed into a solr core with the names mycore1 and mycore2.

The Solr server is on solr.backend:8983

server {
listen 443;
server_name my.ocfl-nginx.org;

set $ocfl_root /etc/share/nginx/html;
set $ocfl_autoindex ro-crate-preview.html;

location /solr/ {
proxy_pass http://solr.backend:8983;
}

location /myrepo1/ {
set $ocfl_repo myrepo1_ocfl;
set $ocfl_solr mycore1
js_content ocfl;
}

location /myrepo2/ {
set $ocfl_repo myrepo2_ocfl;
set $ocfl_solr mycore2
js_content ocfl;
}

location /myrepo2_ocfl/ {
root $ocfl_root;
}

location /myrepo1_ocfl/ {
root $ocfl_root;
}

}

Sample config for a server with one ocfl repository at /etc/share/nginx/html/myrepo_ocfl which is indexed in a static json file called index.json. Note that the js content handler for this use case is ocfl_json


server {
listen 443;
server_name my.ocfl-nginx.org;

set $ocfl_root /etc/share/nginx/html;
set $ocfl_autoindex ro-crate-preview.html;

location /solr/ {
proxy_pass http://solr.backend:8983;
}

location /myrepo/ {
set $ocfl_repo myrepo_ocfl;
set $ocfl_index index.json
js_content ocfl_json;
}
location /myrepo1_ocfl/ {
root $ocfl_root;
}

}

0 comments on commit 9f4bbb3

Please sign in to comment.