mirror of
https://github.com/alangrainger/immich-public-proxy.git
synced 2024-12-29 12:21:57 +00:00
Change Node image to lts-slim
This commit is contained in:
parent
a9a414eb68
commit
15b1b89f4f
3 changed files with 12 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
||||||
FROM node:lts-alpine
|
FROM node:lts-slim
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,6 @@ services:
|
||||||
env_file:
|
env_file:
|
||||||
- .env
|
- .env
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ([ "$(wget -qO- ${PROXY_PUBLIC_URL}/healthcheck)" = "ok" ] && exit 0) || exit 1
|
test: node /app/healthcheck.js
|
||||||
interval: 120s
|
interval: 120s
|
||||||
start_period: 5s
|
start_period: 5s
|
||||||
|
|
10
healthcheck.js
Normal file
10
healthcheck.js
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
(async () => {
|
||||||
|
require('dotenv').config()
|
||||||
|
try {
|
||||||
|
const res = await fetch(process.env.PROXY_PUBLIC_URL + '/healthcheck')
|
||||||
|
if (await res.text() === 'ok') {
|
||||||
|
process.exit(0)
|
||||||
|
}
|
||||||
|
} catch (e) { }
|
||||||
|
process.exit(1)
|
||||||
|
})()
|
Loading…
Reference in a new issue