Move healthcheck to Dockerfile

This commit is contained in:
Alan Grainger 2024-11-02 23:13:32 +01:00
parent 4ed249086c
commit cb02aafee7
3 changed files with 3 additions and 5 deletions

View File

@ -19,4 +19,6 @@ RUN chown -R node:node /app
USER node USER node
HEALTHCHECK --interval=30s --start-period=10s --timeout=5s CMD node /app/healthcheck.js || exit 1
CMD ["pm2-runtime", "dist/index.js" ] CMD ["pm2-runtime", "dist/index.js" ]

View File

@ -4,7 +4,7 @@
"scripts": { "scripts": {
"dev": "ts-node src/index.ts", "dev": "ts-node src/index.ts",
"build": "npx tsc", "build": "npx tsc",
"test": "podman build -t immich-proxy-test .. && podman run --init -it -p=3000:3000 --env-file .env immich-proxy-test", "test": "podman build --format docker -t immich-proxy-test .. && podman run --init -it -p=3000:3000 --env-file .env immich-proxy-test",
"start": "node dist/index.js" "start": "node dist/index.js"
}, },
"author": "Alan Grainger", "author": "Alan Grainger",

View File

@ -6,7 +6,3 @@ services:
ports: ports:
- ${PORT}:3000 - ${PORT}:3000
env_file: .env env_file: .env
healthcheck:
test: node /app/healthcheck.js
interval: 30s
start_period: 10s