From 79f3fcc2c8f53a3eb840ac7826a87c6f4a5a79cf Mon Sep 17 00:00:00 2001 From: "Radu C. Martin" Date: Wed, 25 Oct 2023 22:26:52 +0200 Subject: [PATCH] feat: add immich docker compose --- .gitignore | 1 + docker-compose.yml | 121 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 122 insertions(+) create mode 100644 .gitignore create mode 100644 docker-compose.yml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..03bd412 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.env diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..3390fb1 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,121 @@ +version: "3.8" + +services: + immich-server: + container_name: immich_server + image: ghcr.io/immich-app/immich-server:v1.82.1@sha256:c6dc1823f99e3b23002088eab26b7675e7c3b4703ab71449d054dd18bbdfb11d + command: ["start.sh", "immich"] + volumes: + - library:/usr/src/app/upload + - /etc/localtime:/etc/localtime:ro + env_file: + - stack.env + depends_on: + - redis + - database + - typesense + restart: always + networks: + - immich + + immich-microservices: + container_name: immich_microservices + image: ghcr.io/immich-app/immich-server:v1.82.1@sha256:c6dc1823f99e3b23002088eab26b7675e7c3b4703ab71449d054dd18bbdfb11d + command: ["start.sh", "microservices"] + volumes: + - library:/usr/src/app/upload + - /etc/localtime:/etc/localtime:ro + env_file: + - stack.env + depends_on: + - redis + - database + - typesense + restart: always + networks: + - immich + + immich-machine-learning: + container_name: immich_machine_learning + image: ghcr.io/immich-app/immich-machine-learning:v1.82.1@sha256:9ff5a57031bcf687b2d222f5f473279ae5e47908d38da70c568c95b211227667 + volumes: + - model-cache:/cache + env_file: + - stack.env + restart: always + networks: + - immich + + immich-web: + container_name: immich_web + image: ghcr.io/immich-app/immich-web:v1.82.1@sha256:b59ec80d45a9395f020c312868abd08eafbfe3594e83955d7e566096309f0f2f + env_file: + - stack.env + restart: always + networks: + - immich + + typesense: + container_name: immich_typesense + image: typesense/typesense:0.24.1@sha256:9bcff2b829f12074426ca044b56160ca9d777a0c488303469143dd9f8259d4dd + environment: + - TYPESENSE_API_KEY=${TYPESENSE_API_KEY} + - TYPESENSE_DATA_DIR=/data + # remove this to get debug messages + - GLOG_minloglevel=1 + volumes: + - tsdata:/data + restart: always + networks: + - immich + + redis: + container_name: immich_redis + image: redis:6.2-alpine@sha256:70a7a5b641117670beae0d80658430853896b5ef269ccf00d1827427e3263fa3 + restart: always + networks: + - immich + + database: + container_name: immich_postgres + image: postgres:14-alpine@sha256:28407a9961e76f2d285dc6991e8e48893503cc3836a4755bbc2d40bcc272a441 + env_file: + - stack.env + environment: + POSTGRES_PASSWORD: ${DB_PASSWORD} + POSTGRES_USER: ${DB_USERNAME} + POSTGRES_DB: ${DB_DATABASE_NAME} + volumes: + - pgdata:/var/lib/postgresql/data + restart: always + networks: + - immich + + immich-proxy: + container_name: immich_proxy + image: ghcr.io/immich-app/immich-proxy:v1.82.1@sha256:96239238d467a69e68db007339497c5e5bab820d2152300aa46b3e031f2c245e + environment: + # Make sure these values get passed through from the env file + - IMMICH_SERVER_URL + - IMMICH_WEB_URL + - LETSENCRYPT_HOST=${IMMICH_HOST:?} + - VIRTUAL_HOST=${IMMICH_HOST:?} + - VIRTUAL_PORT=${IMMICH_PORT:-8080} + depends_on: + - immich-server + - immich-web + restart: always + networks: + - net + - immich + +volumes: + pgdata: + model-cache: + tsdata: + library: + +networks: + net: + external: true + immich: