瀏覽代碼

Update in-page sample .env contents and clarify process (#2252)

* Update .env example and clarify process

Update .env contents, and add a little clarification about commands being run. On Windows, for example, you might not have wget, but you'd need to be in the directory with the docker-compose.yml and .env files to run the docker-compose up -d command successfully. (Took me a while to figure out at first)

* Fix some formatting/wording

* Put log level back in and add typesense settings to address PR comments
David 2 年之前
父節點
當前提交
635eee9e5e
共有 1 個文件被更改,包括 60 次插入12 次删除
  1. 60 12
      docs/docs/install/docker-compose.md

+ 60 - 12
docs/docs/install/docker-compose.md

@@ -8,9 +8,14 @@ Docker Compose is the recommended method to run Immich in production. Below are
 
 ### Step 1 - Download the required files
 
-Download [`docker-compose.yml`][compose-file] [`example.env`][env-file].
+Create a directory of your choice (e.g. `./immich-app`) to hold the `docker-compose.yml` and `.env` files.
 
-From a directory of your choice (e.g. `./immich-app`) run the following commands:
+```bash title="Move to the directory you created"
+mkdir ./immich-app
+cd ./immich-app
+```
+
+Download [`docker-compose.yml`][compose-file] and [`example.env`][env-file], either by running the following commands:
 
 ```bash title="Get docker-compose.yml file"
 wget https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml
@@ -20,6 +25,10 @@ wget https://github.com/immich-app/immich/releases/latest/download/docker-compos
 wget -O .env https://github.com/immich-app/immich/releases/latest/download/example.env
 ```
 
+or by downloading from your browser and moving the files to the directory that you created.
+
+Note: If you downloaded the files from your browser, also ensure that you rename `example.env` to `.env`.
+
 ### Step 2 - Populate the .env file with custom values
 
 <details>
@@ -57,11 +66,14 @@ REDIS_HOSTNAME=immich_redis
 # REDIS_SOCKET=
 
 ###################################################################################
-# Upload File Config
+# Upload File Location
+#
+# This is the location where uploaded files are stored.
 ###################################################################################
 
 UPLOAD_LOCATION=absolute_location_on_your_machine_where_you_want_to_store_the_backup
 
+
 ###################################################################################
 # Log message level - [simple|verbose]
 ###################################################################################
@@ -69,11 +81,17 @@ UPLOAD_LOCATION=absolute_location_on_your_machine_where_you_want_to_store_the_ba
 LOG_LEVEL=simple
 
 ###################################################################################
-# Reverse Geocoding
-####################################################################################
-
-# DISABLE_REVERSE_GEOCODING=false
+# Typesense
+###################################################################################
+# TYPESENSE_ENABLED=false
+TYPESENSE_API_KEY=some-random-text
+# TYPESENSE_HOST: typesense
+# TYPESENSE_PORT: 8108
+# TYPESENSE_PROTOCOL: http
 
+###################################################################################
+# Reverse Geocoding
+#
 # Reverse geocoding is done locally which has a small impact on memory usage
 # This memory usage can be altered by changing the REVERSE_GEOCODING_PRECISION variable
 # This ranges from 0-3 with 3 being the most precise
@@ -81,28 +99,58 @@ LOG_LEVEL=simple
 # 2 - Cities > 1000 population: ~150MB RAM
 # 1 - Cities > 5000 population: ~80MB RAM
 # 0 - Cities > 15000 population: ~40MB RAM
+####################################################################################
 
+# DISABLE_REVERSE_GEOCODING=false
 # REVERSE_GEOCODING_PRECISION=3
 
 ####################################################################################
 # WEB - Optional
-####################################################################################
-
+#
 # Custom message on the login page, should be written in HTML form.
-# 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>"
+# 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="My Family Photos and Videos Backup Server"
+
+####################################################################################
+# 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
+
+####################################################################################
+# 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 you want mobile apps to access the immich API over a custom URL. Do not include trailing slash.
+# NOTE: At this time, the web app will not be affected by this setting and will continue to use the relative path: /api
+# Examples: http://localhost:3001, http://immich-api.example.com, etc
+####################################################################################
+
+#IMMICH_API_URL_EXTERNAL=http://localhost:3001
 ```
 
 </details>
 
 - Populate custom database information if necessary.
 - Populate `UPLOAD_LOCATION` with your preferred location for storing backup assets.
+- Consider changing `DB_PASSWORD` to something randomly generated
+- Consider changing `TYPESENSE_API_KEY` to something randomly generated
 
 ### Step 3 - Start the containers
 
+From the directory you created in Step 1, (which should now contain your customized `docker-compose.yml` and `.env` files) run `docker-compose up -d`.
+
 ```bash title="Start the containers using docker compose command"
-docker-compose up -d # or `docker compose up -d` based on your docker-compose version
+docker-compose up -d     # or `docker compose up -d` based on your docker-compose version
 ```
 
 :::tip
@@ -114,7 +162,7 @@ For more information on how to use the application, please refer to the [Post In
 When a new version of Immich is [released](https://github.com/immich-app/immich/releases), the application can be upgraded with the following commands, run in the directory with the `docker-compose.yml` file:
 
 ```bash title="Upgrade Immich"
-docker-compose pull && docker-compose up -d # Or `docker compose`
+docker-compose pull && docker-compose up -d     # Or `docker compose up -d`
 ```
 
 :::caution Automatic Updates