1
0
Fork 0
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:
Alan Grainger 2024-10-31 19:17:58 +01:00
parent a9a414eb68
commit 15b1b89f4f
3 changed files with 12 additions and 2 deletions

View file

@ -1,4 +1,4 @@
FROM node:lts-alpine FROM node:lts-slim
WORKDIR /app WORKDIR /app

View file

@ -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
View 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)
})()