@@ -1,5 +1,7 @@
|
||||
FROM node:lts-alpine
|
||||
|
||||
RUN apk --no-cache add curl
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY app/ ./
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
<p align="center" width="100%">
|
||||
<a href="https://hub.docker.com/r/alangrainger/immich-public-proxy/tags">
|
||||
<img alt="Docker pulls" src="https://badgen.net/docker/pulls/alangrainger/immich-public-proxy?v1.10.0&icon=docker&label=docker%20pulls&color=green&scale=1.1"></a>
|
||||
<img alt="Docker pulls" src="https://badgen.net/docker/pulls/alangrainger/immich-public-proxy?v1.11.0&icon=docker&label=docker%20pulls&color=green&scale=1.1"></a>
|
||||
<a href="https://github.com/alangrainger/immich-public-proxy/releases/latest">
|
||||
<img alt="Latest release" src="https://badgen.net/github/release/alangrainger/immich-public-proxy?v1.10.0&scale=1.1"></a>
|
||||
<img alt="Latest release" src="https://badgen.net/github/release/alangrainger/immich-public-proxy?v1.11.0&scale=1.1"></a>
|
||||
<a href="https://immich-demo.note.sx/share/gJfs8l4LcJJrBUpjhMnDoKXFt1Tm5vKXPbXl8BgwPtLtEBCOOObqbQdV5i0oun5hZjQ"><img alt="Open demo gallery" src="https://badgen.net/static/↗🖼️/live%20demo/green?scale=1.1"></a>
|
||||
</p>
|
||||
|
||||
@@ -148,6 +148,7 @@ There are some additional configuration options you can change, for example the
|
||||
| `showGalleryTitle` | `bool` | Show a title on the gallery page. |
|
||||
| `allowDownloadAll` | `int` | Allow visitors to download all files as a zip.<br>`0` disable downloads<br>`1` follow Immich setting per share ([example](https://github.com/user-attachments/assets/79ea8c08-71ce-42ab-b025-10aec384938a))<br>`2` always allowed |
|
||||
| `showHomePage` | `bool` | Set to `false` to remove the IPP shield page at `/` and at `/share` |
|
||||
| `showMetadata` | `object` | See the [Metadata](#metadata) section below. |
|
||||
| `customInvalidResponse` | various | Send a custom response instead of the default 404 - see [Custom responses](docs/custom-responses.md) for more details. |
|
||||
|
||||
For example, to disable the home page at `/` and at `/share` you need to change `showHomePage` to `false`:
|
||||
@@ -159,10 +160,14 @@ For example, to disable the home page at `/` and at `/share` you need to change
|
||||
...
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
```
|
||||
|
||||
#### Metadata
|
||||
|
||||
| Option | Type | Description |
|
||||
|---------------|--------|----------------------------------------------------|
|
||||
| `description` | `bool` | Show the description as a caption below the photo. |
|
||||
|
||||
### lightGallery
|
||||
|
||||
The gallery is created using [lightGallery](https://github.com/sachinchoolur/lightGallery).
|
||||
|
||||
+4
-1
@@ -7,9 +7,12 @@
|
||||
"singleImageGallery": false,
|
||||
"singleItemAutoOpen": true,
|
||||
"downloadOriginalPhoto": true,
|
||||
"showGalleryTitle": false,
|
||||
"allowDownloadAll": 0,
|
||||
"showHomePage": true,
|
||||
"showGalleryTitle": false,
|
||||
"showMetadata": {
|
||||
"description": false
|
||||
},
|
||||
"customInvalidResponse": false
|
||||
},
|
||||
"lightGallery": {
|
||||
|
||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "immich-public-proxy",
|
||||
"version": "1.9.1",
|
||||
"version": "1.11.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "immich-public-proxy",
|
||||
"version": "1.9.1",
|
||||
"version": "1.11.0",
|
||||
"license": "AGPL-3.0",
|
||||
"dependencies": {
|
||||
"archiver": "^7.0.1",
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "immich-public-proxy",
|
||||
"version": "1.10.0",
|
||||
"version": "1.11.0",
|
||||
"scripts": {
|
||||
"dev": "ts-node src/index.ts",
|
||||
"build": "npx tsc",
|
||||
|
||||
+1
-1
@@ -122,7 +122,7 @@ class Render {
|
||||
downloadUrl,
|
||||
thumbnailUrl: baseUrl + immich.photoUrl(share.key, asset.id, ImageSize.thumbnail),
|
||||
video,
|
||||
description: asset?.exifInfo?.description ?? ''
|
||||
description: getConfigOption('ipp.showMetadata.description', false) && typeof asset?.exifInfo?.description === 'string' ? asset.exifInfo.description : ''
|
||||
})
|
||||
}
|
||||
res.render('gallery', {
|
||||
|
||||
@@ -32,6 +32,8 @@
|
||||
<%
|
||||
// Load the first 50 thumbnails, then load more as the user scrolls. See web.js
|
||||
items.slice(0, 50).forEach(item => {
|
||||
// Replace HTML entities for description text (if any)
|
||||
item.description = item.description.replace(/'/g, ''')
|
||||
if (item.video) { %>
|
||||
<a data-video='<%- item.video %>'
|
||||
<% if (item.description) { %>
|
||||
@@ -65,7 +67,11 @@
|
||||
<script src="/share/static/lg/lg-video.min.js"></script>
|
||||
<script src="/share/static/lg/lg-zoom.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
lgallery.init(<%- JSON.stringify({lgConfig, items, openItem}) %>) // initLightGallery imported from web.js
|
||||
lgallery.init(<%- JSON.stringify({
|
||||
lgConfig,
|
||||
items,
|
||||
openItem
|
||||
}) %>) // initLightGallery imported from web.js
|
||||
<% if (openItem) { %>
|
||||
const openItem = <%- openItem %>
|
||||
const thumbs = document.querySelectorAll('#lightgallery a')
|
||||
|
||||
+1
-1
@@ -8,6 +8,6 @@ services:
|
||||
environment:
|
||||
- IMMICH_URL=http://your-internal-immich-server:2283
|
||||
healthcheck:
|
||||
test: wget -q -T 10 --spider http://localhost:3000/share/healthcheck || exit 1
|
||||
test: curl -s http://localhost:3000/share/healthcheck -o /dev/null || exit 1
|
||||
start_period: 10s
|
||||
timeout: 5s
|
||||
|
||||
Reference in New Issue
Block a user