Skip to content
Snippets Groups Projects
Verified Commit 10f01d6b authored by Loïs Poujade's avatar Loïs Poujade
Browse files

Fixes from review

parent 96c9477f
1 merge request!3Basic docker stack to build and serve Mirador
# host port
PORT=
# container restart policy
RESTART=
www/ www/
.env
node_modules/ node_modules/
dist/ dist/
package-lock.json package-lock.json
......
:80 { :80 {
root * /srv root * /srv
file_server browse file_server browse
header Access-Control-Allow-Origin "*"
} }
## Mirador Video Annotation POC ## Mirador Video Annotation POC
Run `docker-compose up -d`, which will serve a mirador instance to `http://localhost:8080`. The `www` directory is accessible via `http://localhost:8080/data` Run `docker-compose up -d`, which will serve a mirador instance to `http://localhost:8080`. If sources files are modified, run `docker-compose up -d --build`
...@@ -2,9 +2,9 @@ version: "3.9" ...@@ -2,9 +2,9 @@ version: "3.9"
services: services:
httpd: httpd:
build: . build: .
restart: unless-stopped restart: $RESTART
ports: ports:
- "8080:80" - $PORT:80
volumes: volumes:
- ./www:/srv/data - ./www:/srv/data
- ./Caddyfile:/etc/caddy/Caddyfile - ./Caddyfile:/etc/caddy/Caddyfile
import Mirador from 'mirador/dist/es/src/index' import Mirador from 'mirador/dist/es/src/index';
const config = { const config = {
id: 'demo' id: 'demo',
theme: { transitions: window.location.port === '4488' ? { create: () => 'none' } : {}, },
catalog: [
{ manifestId: 'http://localhost/dzkimgs_annotated_video.json' },
{ manifestId: 'http://localhost/video_split_annopage.json' },
{ manifestId: 'http://localhost/fediverse.json' },
{ manifestId: 'http://localhost/localvideo.json' },
{ manifestId: 'http://localhost/local_catvideo.json' },
{ manifestId: 'https://dzkimgs.l.u-tokyo.ac.jp/videos/iiif_in_japan_2017/manifest.json' },
{ manifestId: 'https://iiif.bodleian.ox.ac.uk/iiif/manifest/e32a277e-91e2-4a6d-8ba6-cc4bad230410.json' },
{ manifestId: 'https://iiif.harvardartmuseums.org/manifests/object/299843' }
]
} }
Mirador.viewer(config, []) Mirador.viewer(config, [
]);
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title>Basic Mirador</title>
</head>
<body>
<div id="demo"></div>
<script src="dist/main.js"></script>
</body>
</html>
const path = require('path');
module.exports = {
entry: './src/index.js',
output: {
filename: 'main.js',
path: path.resolve(__dirname, 'dist'),
publicPath: './dist/',
},
};
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment