Add Immich to separate network in order to prevent clashes with WSL host

This commit is contained in:
moshferatu 2024-03-24 07:14:05 -07:00
parent 9e2396ce31
commit 480fcaf6b9

View File

@ -12,6 +12,8 @@ services:
- REDIS_HOSTNAME=immich-redis - REDIS_HOSTNAME=immich-redis
volumes: volumes:
- <media directory>/Photos:/usr/src/app/upload - <media directory>/Photos:/usr/src/app/upload
networks:
- immich
ports: ports:
- 2283:3001 - 2283:3001
depends_on: depends_on:
@ -30,6 +32,8 @@ services:
- REDIS_HOSTNAME=immich-redis - REDIS_HOSTNAME=immich-redis
volumes: volumes:
- <media directory>/Photos:/usr/src/app/upload - <media directory>/Photos:/usr/src/app/upload
networks:
- immich
depends_on: depends_on:
- redis - redis
- database - database
@ -39,10 +43,14 @@ services:
image: ghcr.io/immich-app/immich-machine-learning:release image: ghcr.io/immich-app/immich-machine-learning:release
volumes: volumes:
- <docker directory>/immich/model-cache:/cache - <docker directory>/immich/model-cache:/cache
networks:
- immich
restart: unless-stopped restart: unless-stopped
redis: redis:
container_name: immich-redis container_name: immich-redis
image: redis:6.2-alpine@sha256:51d6c56749a4243096327e3fb964a48ed92254357108449cb6e23999c37773c5 image: redis:6.2-alpine@sha256:51d6c56749a4243096327e3fb964a48ed92254357108449cb6e23999c37773c5
networks:
- immich
restart: unless-stopped restart: unless-stopped
database: database:
container_name: immich-postgres container_name: immich-postgres
@ -53,4 +61,12 @@ services:
POSTGRES_DB: POSTGRES_DB:
volumes: volumes:
- <docker directory>/immich/postgres:/var/lib/postgresql/data - <docker directory>/immich/postgres:/var/lib/postgresql/data
restart: unless-stopped networks:
- immich
restart: unless-stopped
networks:
immich:
name: immich
ipam:
config:
- subnet: <subnet>