mirror of
				https://github.com/KevinMidboe/immich.git
				synced 2025-10-29 17:40:28 +00:00 
			
		
		
		
	feat(deployment) Allow overriding service host and ports with env variables (#930)
* Add proxy changes * Add web changes * Add microservices changes * Add examples * Add header comment to nginx config * Use URLs instead of host and port
This commit is contained in:
		| @@ -67,3 +67,14 @@ JWT_SECRET= | ||||
| # For example PUBLIC_LOGIN_PAGE_MESSAGE="This is a demo instance of Immich.<br><br>Email: <i>demo@demo.de</i><br>Password: <i>demo</i>" | ||||
|  | ||||
| PUBLIC_LOGIN_PAGE_MESSAGE= | ||||
|  | ||||
| #################################################################################### | ||||
| # Alternative Service Addresses - Optional | ||||
| #################################################################################### | ||||
|  | ||||
| # This is an advanced feature for users who may be running their immich services on different hosts. It will not change which address or port that services bind to within their containers, but it will change where other services look for their peers. | ||||
| # Note: immich-microservices is bound to 3002, but no references are made | ||||
|  | ||||
| # IMMICH_WEB_URL=http://immich-web:3000 | ||||
| # IMMICH_SERVER_URL=http://immich-server:3001 | ||||
| # IMMICH_MACHINE_LEARNING_URL=http://immich-machine-learning:3003 | ||||
|   | ||||
| @@ -68,6 +68,9 @@ services: | ||||
|     command: npm run dev --host | ||||
|     env_file: | ||||
|       - .env | ||||
|     environment: | ||||
|       # Rename these values for svelte public interface | ||||
|       - PUBLIC_IMMICH_SERVER_URL=${IMMICH_SERVER_URL} | ||||
|     ports: | ||||
|       - 3000:3000 | ||||
|       - 24678:24678 | ||||
| @@ -100,6 +103,10 @@ services: | ||||
|   immich-proxy: | ||||
|     container_name: immich_proxy | ||||
|     image: immich-proxy-dev:latest | ||||
|     environment: | ||||
|       # Make sure these values get passed through from the env file | ||||
|       - IMMICH_SERVER_URL | ||||
|       - IMMICH_WEB_URL | ||||
|     build: | ||||
|       context: ../nginx | ||||
|       dockerfile: Dockerfile | ||||
|   | ||||
| @@ -47,6 +47,9 @@ services: | ||||
|     entrypoint: ["/bin/sh", "./entrypoint.sh"] | ||||
|     env_file: | ||||
|       - .env | ||||
|     environment: | ||||
|       # Rename these values for svelte public interface | ||||
|       - PUBLIC_IMMICH_SERVER_URL=${IMMICH_SERVER_URL} | ||||
|     restart: always | ||||
|  | ||||
|   redis: | ||||
| @@ -71,6 +74,10 @@ services: | ||||
|   immich-proxy: | ||||
|     container_name: immich_proxy | ||||
|     image: altran1502/immich-proxy:staging | ||||
|     environment: | ||||
|       # Make sure these values get passed through from the env file | ||||
|       - IMMICH_SERVER_URL | ||||
|       - IMMICH_WEB_URL | ||||
|     ports: | ||||
|       - 2283:8080 | ||||
|     logging: | ||||
|   | ||||
| @@ -47,6 +47,9 @@ services: | ||||
|     entrypoint: ["/bin/sh", "./entrypoint.sh"] | ||||
|     env_file: | ||||
|       - .env | ||||
|     environment: | ||||
|       # Rename these values for svelte public interface | ||||
|       - PUBLIC_IMMICH_SERVER_URL=${IMMICH_SERVER_URL} | ||||
|     restart: always | ||||
|  | ||||
|   redis: | ||||
| @@ -71,6 +74,10 @@ services: | ||||
|   immich-proxy: | ||||
|     container_name: immich_proxy | ||||
|     image: altran1502/immich-proxy:release | ||||
|     environment: | ||||
|       # Make sure these values get passed through from the env file | ||||
|       - IMMICH_SERVER_URL | ||||
|       - IMMICH_WEB_URL | ||||
|     ports: | ||||
|       - 2283:8080 | ||||
|     logging: | ||||
|   | ||||
		Reference in New Issue
	
	Block a user