Skip to main content

Create docker-compose.yml

 Create docker-compose.yml and post bellow text (make sure you removed quote from begging)

 

# Docker Compose file for running paperless from the Docker Hub.
# WARNING:This file contains everything paperless needs to run.
# Paperless supports amd64, arm and arm64 hardware.
#
# All compose files of paperless configure paperless in the following way:
#
# - Paperless is (re)started on system boot, if it was running before shutdown.
# - Docker volumes for storing data are managed by Docker.
# - Folders for importing and exporting files are created in the same directory
#   as this file and mounted to the correct folders inside the container.
# - Paperless listens on port 8000.
#
# In addition to that, this Docker Compose file adds the following optional
# configurations:
#
# - Instead of SQLite (default), PostgreSQL is used as the database server.
#
# To install Immich,and followupdate ourpaperless guide:with https://immich.app/docs/install/docker-composethis file, do the following:
#
# Make- sureCopy tothis usefile as 'docker-compose.yml' and the files 'docker-compose.ymlenv'
#   ofand the'.env' currentinto release:a folder.
# - Run 'docker compose pull'.
# - Run 'docker compose up -d'.
#
# https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml
#For more extensive installation and update instructions, refer to the
# The compose file on main may not be compatible with the latest release.

name: immichdocumentation.

services:
  immich-server:broker:
    container_name:image: immich_serverdocker.io/library/redis:8
    restart: unless-stopped
    volumes:
      - redisdata:/data
  db:
    image: docker.io/library/postgres:17
    restart: unless-stopped
    volumes:
      - pgdata:/var/lib/postgresql/data
    environment:
      POSTGRES_DB: paperless
      POSTGRES_USER: paperless
      POSTGRES_PASSWORD: paperless
  webserver:
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}paperless-ngx/paperless-ngx:latest
    #restart: extends:unless-stopped
    #   file: hwaccel.transcoding.yml
    #   service: cpu # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding
    volumes:
      # 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 filedepends_on:
      - ${UPLOAD_LOCATION}:/usr/src/app/uploaddb
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - .envbroker
    ports:
      - '2283:2283'
    depends_on:
      - redis
      - database
    restart: always
    healthcheck:
      disable: false

  immich-machine-learning:
    container_name: immich_machine_learning
    # For hardware acceleration, add one of -[armnn, cuda, rocm, openvino, rknn] to the image tag.
    # Example tag: ${IMMICH_VERSION:-release}-cuda
    image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
    # extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/ml-hardware-acceleration
    #   file: hwaccel.ml.yml
    #   service: cpu # set to one of [armnn, cuda, rocm, openvino, openvino-wsl, rknn] for accelerated inference - use the `-wsl` version for WSL2 where applicable"9095:8000"
    volumes:
      - model-cache:data:/cacheusr/src/paperless/data
      env_file:- media:/usr/src/paperless/media
      - .env/export:/usr/src/paperless/export
      restart:- always./consume:/usr/src/paperless/consume
    healthcheck:
env_file:     disable: false

  redis:
    container_name: immich_redis
    image: docker.io/valkey/valkey:8-bookworm@sha256:ff21bc0f8194dc9c105b769aeabf9585fea6a8ed649c0781caeac5cb3c247884
    healthcheck:
      test: redis-cli ping || exit 1
    restart: always

  database:
    container_name: immich_postgres
    image: ghcr.io/immich-app/postgres:14-vectorchord0.3.0-pgvectors0.2.0@sha256:fa4f6e0971f454cd95fec5a9aaed2ed93d8f46725cc6bc61e0698e97dba96da1docker-compose.env
    environment:
      POSTGRES_PASSWORD:PAPERLESS_REDIS: ${DB_PASSWORD}redis://broker:6379
      POSTGRES_USER:PAPERLESS_DBHOST: ${DB_USERNAME}db
      POSTGRES_DB: ${DB_DATABASE_NAME}
      POSTGRES_INITDB_ARGS: '--data-checksums'
      # Uncomment the DB_STORAGE_TYPE: 'HDD' var if your database isn't stored on SSDs
      # DB_STORAGE_TYPE: 'HDD'
    volumes:
  # Do not edit the next line. If you want to change the database storage location on your system, edit the value of DB_DATA_LOCATION in the .env filedata:
  - ${DB_DATA_LOCATION}:/var/lib/postgresql/datamedia:
  restart: always

volumes:pgdata:
  model-cache:redisdata: