mirror of
https://github.com/alangrainger/immich-public-proxy.git
synced 2024-12-26 19:01:58 +00:00
Update healthcheck
This commit is contained in:
parent
69d88fa849
commit
caced325bd
5 changed files with 6 additions and 8 deletions
|
@ -1,2 +1,4 @@
|
|||
node_modules/
|
||||
dist/
|
||||
/app/node_modules/
|
||||
/app/dist/
|
||||
/app/.env
|
||||
/app/package-lock.json
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
IMMICH_URL=http://localhost:2283
|
||||
PROXY_PUBLIC_URL=https://your-proxy-url.com
|
||||
PORT=3000
|
||||
CACHE_AGE=2592000
|
|
@ -52,13 +52,11 @@ Here is an example setup for [securing Immich behind mTLS](./docs/securing-immic
|
|||
|
||||
```
|
||||
IMMICH_URL=http://localhost:2283
|
||||
PROXY_PUBLIC_URL=https://your-proxy-url.com
|
||||
PORT=3000
|
||||
CACHE_AGE=2592000
|
||||
```
|
||||
|
||||
- `IMMICH_URL` is the URL to access Immich in your local network. This is not your public URL.
|
||||
- `PROXY_PUBLIC_URL` is the public URL for your proxy.
|
||||
- `PORT` is the external port you want for the docker container.
|
||||
- `CACHE_AGE` this is setting the Cache-Control header, to tell the visitor's browser to cache the assets. Set to 0 to disable caching. By default this is 30 days.
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
(async () => {
|
||||
try {
|
||||
require('dotenv').config()
|
||||
const res = await fetch(process.env.PROXY_PUBLIC_URL + '/healthcheck')
|
||||
const res = await fetch('http://localhost:3000/healthcheck')
|
||||
if (await res.text() === 'ok') {
|
||||
process.exit(0)
|
||||
}
|
||||
|
|
|
@ -8,5 +8,5 @@ services:
|
|||
env_file: .env
|
||||
healthcheck:
|
||||
test: node /app/healthcheck.js
|
||||
interval: 120s
|
||||
interval: 30s
|
||||
start_period: 5s
|
||||
|
|
Loading…
Reference in a new issue