diff --git a/.dockerignore b/.dockerignore index b947077..a5249c1 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,2 +1,4 @@ -node_modules/ -dist/ +/app/node_modules/ +/app/dist/ +/app/.env +/app/package-lock.json diff --git a/app/.env.example b/.env.example similarity index 58% rename from app/.env.example rename to .env.example index 6bd1d6c..e6241f1 100644 --- a/app/.env.example +++ b/.env.example @@ -1,4 +1,3 @@ IMMICH_URL=http://localhost:2283 -PROXY_PUBLIC_URL=https://your-proxy-url.com PORT=3000 CACHE_AGE=2592000 diff --git a/README.md b/README.md index 6cbd99b..697cb67 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/app/healthcheck.js b/app/healthcheck.js index 2cdd4ee..3629b96 100644 --- a/app/healthcheck.js +++ b/app/healthcheck.js @@ -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) } diff --git a/docker-compose.yml b/docker-compose.yml index e5f0733..da75e23 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,5 +8,5 @@ services: env_file: .env healthcheck: test: node /app/healthcheck.js - interval: 120s + interval: 30s start_period: 5s