mirror of
https://github.com/alangrainger/immich-public-proxy.git
synced 2024-12-28 03:41:58 +00:00
Update docs
This commit is contained in:
parent
0d3d6f4989
commit
0ed2ebd5c2
5 changed files with 14 additions and 12 deletions
|
@ -1,5 +1,4 @@
|
|||
IMMICH_URL=http://localhost:2283
|
||||
API_KEY="Get this from your Immich Account Settings page"
|
||||
SERVER_URL=https://shared.example.com
|
||||
SERVER_PORT=3000
|
||||
PORT=3000
|
||||
CACHE_AGE=2592000
|
||||
|
|
11
README.md
11
README.md
|
@ -1,5 +1,9 @@
|
|||
# Immich Public Proxy
|
||||
|
||||
Share your Immich photos and albums in a safe way without exposing your Immich instance to the public.
|
||||
|
||||
[Live demo](https://share.alan.gr/share/UiOulNielojwHbS0IJi5blwBOFzYC18CuPVtU23Bl3XK5YNVkbRONRT-HOTMQSMgdNs)
|
||||
|
||||
<p align="center" width="100%">
|
||||
<img src="public/images/immich.png" width="180" height="180">
|
||||
</p>
|
||||
|
@ -28,13 +32,12 @@ git clone https://github.com/alangrainger/immich-public-proxy.git
|
|||
```
|
||||
IMMICH_URL=http://localhost:2283
|
||||
API_KEY="Get this from your Immich Account Settings page"
|
||||
SERVER_URL=https://shared.example.com
|
||||
SERVER_PORT=3000
|
||||
PORT=3000
|
||||
CACHE_AGE=2592000
|
||||
```
|
||||
|
||||
- `IMMICH_URL` is the URL to access Immich in your local network. This is not your public URL.
|
||||
- `SERVER_URL` will be the public URL for accessing this Immich Public Proxy app.
|
||||
- `API_KEY` get this from the Account Settings page of your Immich user account
|
||||
- `CACHE_AGE` by default, assets will be cached for 30 days. Set this to 0 to disable caching.
|
||||
|
||||
3. Start the docker container:
|
||||
|
@ -43,7 +46,7 @@ CACHE_AGE=2592000
|
|||
docker-compose up -d
|
||||
```
|
||||
|
||||
4. Set the "External domain" in your Immich **Server Settings** to be the same as your `SERVER_URL`:
|
||||
4. Set the "External domain" in your Immich **Server Settings** to be the same as the public URL for your Immich Public Proxy:
|
||||
|
||||
<img src="public/images/server-settings.png" width="418" height="205">
|
||||
|
||||
|
|
6
dist/immich.js
vendored
6
dist/immich.js
vendored
File diff suppressed because one or more lines are too long
|
@ -10,7 +10,7 @@ services:
|
|||
volumes:
|
||||
- ./:/home/node/app:Z
|
||||
ports:
|
||||
- ${SERVER_PORT}:3000
|
||||
- ${PORT}:3000
|
||||
command: bash -c "cd /home/node/app && npm install && npm start"
|
||||
restart: always
|
||||
healthcheck:
|
||||
|
|
|
@ -69,14 +69,14 @@ class Immich {
|
|||
* Return the image data URL for a photo
|
||||
*/
|
||||
photoUrl (key: string, id: string, size?: ImageSize) {
|
||||
return `${process.env.SERVER_URL}/photo/${key}/${id}` + (size ? `?size=${size}` : '')
|
||||
return `/photo/${key}/${id}` + (size ? `?size=${size}` : '')
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the video data URL for a video
|
||||
*/
|
||||
videoUrl (key: string, id: string) {
|
||||
return `${process.env.SERVER_URL}/video/${key}/${id}`
|
||||
return `/video/${key}/${id}`
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue