Skip to content

Commit dd8d0a6

Browse files
committed
feat: refactored to work with coolify auto env vars
1 parent c5fd7ba commit dd8d0a6

File tree

1 file changed

+28
-23
lines changed

1 file changed

+28
-23
lines changed

templates/compose/immich.yaml

Lines changed: 28 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,6 @@
66

77
name: immich
88

9-
x-shared-env: &shared-env
10-
environment:
11-
# You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables
12-
13-
# Hardcoded values, not editable in Coolify UI
14-
- UPLOAD_LOCATION=./library # The location where your uploaded files are stored
15-
- DB_DATA_LOCATION=./postgres # The location where your database files are stored
16-
17-
# Uninitialized variables, editable in Coolify UI
18-
- IMMICH_VERSION=${IMMICH_VERSION:-release} # The Immich version to use, editable in Coolify
19-
20-
# Default values, editable in Coolify UI
21-
- DB_PASSWORD=${SERVICE_PASSWORD_IMMICH} # Default: "postgres", can be overridden
22-
- DB_USERNAME=${SERVICE_USER_IMMICH} # Default: "postgres", can be overridden
23-
- DB_DATABASE_NAME=${DB_DATABASE_NAME:-immich} # Default: "immich", can be overridden
24-
25-
# Optional timezone variable, uninitialized, editable in Coolify UI\
26-
- TZ=${TZ:-Etc/UTC}
27-
289
services:
2910
immich:
3011
container_name: immich_server
@@ -36,11 +17,21 @@ services:
3617
# Do not edit the next line. If you want to change the media storage location on your system, edit the value of UPLOAD_LOCATION in the .env file
3718
- ${UPLOAD_LOCATION}:/usr/src/app/upload
3819
- /etc/localtime:/etc/localtime:ro
39-
<<: *shared-env
4020
environment:
41-
- SERVICE_FQDN_IMMICH=/
42-
- _APP_URL=$SERVICE_FQDN_IMMICH
4321
- SERVICE_FQDN_IMMICH_3001
22+
# You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables
23+
# Hardcoded values, not editable in Coolify UI
24+
- UPLOAD_LOCATION=./library # The location where your uploaded files are stored
25+
- DB_DATA_LOCATION=./postgres # The location where your database files are stored
26+
27+
- IMMICH_VERSION=${IMMICH_VERSION:-release} # The Immich version to use, editable in Coolify
28+
29+
# Default values, editable in Coolify UI
30+
- DB_PASSWORD=$SERVICE_PASSWORD_DATABASE # Default: "postgres", can be overridden
31+
- DB_USERNAME=$SERVICE_USER_DATABASE # Default: "postgres", can be overridden
32+
- DB_DATABASE_NAME=${DB_DATABASE_NAME:-immich} # Default: "immich", can be overridden
33+
34+
- TZ=${TZ:-Etc/UTC}
4435
depends_on:
4536
- redis
4637
- database
@@ -58,7 +49,21 @@ services:
5849
# service: cpu # set to one of [armnn, cuda, openvino, openvino-wsl] for accelerated inference - use the `-wsl` version for WSL2 where applicable
5950
volumes:
6051
- model-cache:/cache
61-
<<: *shared-env
52+
environment:
53+
# You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables
54+
55+
# Hardcoded values, not editable in Coolify UI
56+
- UPLOAD_LOCATION=./library # The location where your uploaded files are stored
57+
- DB_DATA_LOCATION=./postgres # The location where your database files are stored
58+
59+
- IMMICH_VERSION=${IMMICH_VERSION:-release} # The Immich version to use, editable in Coolify
60+
61+
# Default values, editable in Coolify UI
62+
- DB_PASSWORD=$SERVICE_PASSWORD_DATABASE # Default: "postgres", can be overridden
63+
- DB_USERNAME=$SERVICE_USER_DATABASE # Default: "postgres", can be overridden
64+
- DB_DATABASE_NAME=${DB_DATABASE_NAME:-immich} # Default: "immich", can be overridden
65+
66+
- TZ=${TZ:-Etc/UTC}
6267
restart: always
6368
healthcheck:
6469
disable: false

0 commit comments

Comments
 (0)