49 lines
1.5 KiB
Django/Jinja
49 lines
1.5 KiB
Django/Jinja
services:
|
|
immich-server:
|
|
image: {{ immich_server_image }}
|
|
restart: unless-stopped
|
|
env_file: .env
|
|
{% if immich_routing_mode in ["host", "traefik_file"] %}
|
|
ports:
|
|
- "{{ nbops_traefik_file_bind_address if immich_routing_mode == 'traefik_file' else '0.0.0.0' }}:{{ immich_http_port }}:2283"
|
|
{% endif %}
|
|
{% if immich_routing_mode == "traefik" %}
|
|
# internal HTTP service port: 2283; not published on the Docker host
|
|
labels:
|
|
- traefik.enable=true
|
|
- traefik.http.routers.immich.rule=Host(`{{ immich_domain }}`)
|
|
- traefik.http.routers.immich.entrypoints={{ immich_traefik_entrypoint }}
|
|
- traefik.http.routers.immich.tls={{ immich_traefik_tls | bool | ternary('true', 'false') }}
|
|
- traefik.http.services.immich.loadbalancer.server.port=2283
|
|
networks:
|
|
- default
|
|
- {{ immich_traefik_network }}
|
|
{% endif %}
|
|
volumes:
|
|
- {{ immich_upload_location }}:/usr/src/app/upload
|
|
depends_on:
|
|
- redis
|
|
- database
|
|
immich-machine-learning:
|
|
image: {{ immich_ml_image }}
|
|
restart: unless-stopped
|
|
volumes:
|
|
- ./model-cache:/cache
|
|
redis:
|
|
image: {{ immich_redis_image }}
|
|
restart: unless-stopped
|
|
database:
|
|
image: {{ immich_postgres_image }}
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_PASSWORD: ${DB_PASSWORD}
|
|
POSTGRES_USER: ${DB_USERNAME}
|
|
POSTGRES_DB: ${DB_DATABASE_NAME}
|
|
volumes:
|
|
- ./postgres:/var/lib/postgresql/data
|
|
{% if immich_routing_mode == "traefik" %}
|
|
networks:
|
|
{{ immich_traefik_network }}:
|
|
external: true
|
|
{% endif %}
|