From 5eebc03fde48eb25e9f258ec36b221b685083328 Mon Sep 17 00:00:00 2001 From: Connery Noble Date: Wed, 18 Jan 2023 16:01:04 -0800 Subject: [PATCH] rename environment variable to IMMICH_API_URL_EXTERNAL --- docker/.env.example | 6 +++--- docker/docker-compose.dev.yml | 4 ++-- docker/docker-compose.staging.yml | 2 +- docker/docker-compose.yml | 2 +- web/src/api/api.ts | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docker/.env.example b/docker/.env.example index 89adbed8a5..11faccaee1 100644 --- a/docker/.env.example +++ b/docker/.env.example @@ -78,20 +78,20 @@ IMMICH_SERVER_URL=http://immich-server:3001 IMMICH_MACHINE_LEARNING_URL=http://immich-machine-learning:3003 #################################################################################### -# Alternative Public Server Address - Optional +# Alternative API's External Address - Optional # # This is an advanced feature used to control the public server endpoint returned to clients during Well-known discovery. # You should only use this if the API server is exposed publicly via a custom host/path. # Examples: http://localhost:3001, http://immich-api.example.com, etc #################################################################################### -IMMICH_SERVER_PUBLIC_URL=http://localhost:3001 +IMMICH_API_URL_EXTERNAL=http://localhost:3001 #################################################################################### # API Cors Allowed Origins - Optional # # This is required if the API is served from a different domain than the website. -# For example, if IMMICH_SERVER_PUBLIC_URL is set to a full URL. +# For example, if IMMICH_API_URL_EXTERNAL is set to a full URL. #################################################################################### ALLOW_CORS_ORIGIN=http://localhost:2283 \ No newline at end of file diff --git a/docker/docker-compose.dev.yml b/docker/docker-compose.dev.yml index 54e8bb9e14..fde871daff 100644 --- a/docker/docker-compose.dev.yml +++ b/docker/docker-compose.dev.yml @@ -1,4 +1,4 @@ -version: '3.8' +version: "3.8" services: immich-server: @@ -76,7 +76,7 @@ services: environment: # Rename these values for svelte public interface - PUBLIC_IMMICH_SERVER_URL=${IMMICH_SERVER_URL} - - PUBLIC_IMMICH_SERVER_PUBLIC_URL=${IMMICH_SERVER_PUBLIC_URL} + - PUBLIC_IMMICH_API_URL_EXTERNAL=${IMMICH_API_URL_EXTERNAL} ports: - 3000:3000 - 24678:24678 diff --git a/docker/docker-compose.staging.yml b/docker/docker-compose.staging.yml index e70d8b5443..e2bc244045 100644 --- a/docker/docker-compose.staging.yml +++ b/docker/docker-compose.staging.yml @@ -54,7 +54,7 @@ services: environment: # Rename these values for svelte public interface - PUBLIC_IMMICH_SERVER_URL=${IMMICH_SERVER_URL} - - PUBLIC_IMMICH_SERVER_PUBLIC_URL=${IMMICH_SERVER_PUBLIC_URL} + - PUBLIC_IMMICH_API_URL_EXTERNAL=${IMMICH_API_URL_EXTERNAL} restart: always redis: diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 27511d4340..bc6f4698bc 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -54,7 +54,7 @@ services: environment: # Rename these values for svelte public interface - PUBLIC_IMMICH_SERVER_URL=${IMMICH_SERVER_URL} - - PUBLIC_IMMICH_SERVER_PUBLIC_URL=${IMMICH_SERVER_PUBLIC_URL} + - PUBLIC_IMMICH_API_URL_EXTERNAL=${IMMICH_API_URL_EXTERNAL} restart: always redis: diff --git a/web/src/api/api.ts b/web/src/api/api.ts index 9b41708c9d..2cdfeed681 100644 --- a/web/src/api/api.ts +++ b/web/src/api/api.ts @@ -62,7 +62,7 @@ class ImmichApi { // Browser side (public) API client export const api = new ImmichApi(); -api.setBaseUrl(env.PUBLIC_IMMICH_SERVER_PUBLIC_URL || '/api'); +api.setBaseUrl(env.PUBLIC_IMMICH_API_URL_EXTERNAL || '/api'); // Server side API client export const serverApi = new ImmichApi();