Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- The compose script is at the very bottom and the environment variables are just below. Let me know if you have any questions. All of my containers are set to ephemeral=false and I add a tag of container to keep track of them. You can modify both of these settings in the immich-ts environment variables.
- docker env variables:
- DB_DATA_LOCATION=./postgres
- DB_DATABASE_NAME=immich
- DB_USERNAME=(any username works)
- DB_PASSWORD=(generate your password)
- TS_AUTHKEY=(put your tailscale auth key here)
- PWD=(your immich directory on your server, e.g. /opt/portainer/config/immich)
- My tailscale serve file is located at: /opt/portainer/config/immich/immich.json
- Tailscale serve json below for reference, true/false for enabling funnel. Note: You will have to manually approve the funnel in your tailscale console if you set this to true.
- {
- "TCP": {
- "443": {
- "HTTPS": true
- }
- },
- "Web": {
- "immich.(your tailscale magic dns).ts.net:443": {
- "Handlers": {
- "/": {
- "Proxy": "http://127.0.0.1:2283"
- }
- }
- }
- },
- "AllowFunnel": {
- "immich.(your tailscale magic dns).ts.net:443": true
- }
- }
- services:
- immich-ts:
- image: tailscale/tailscale:latest
- container_name: immich-ts
- cap_add:
- - net_admin
- - sys_module
- volumes:
- - ${PWD}/state:/var/lib/tailscale
- - ${PWD}:/config
- - /dev/net/tun:/dev/net/tun
- environment:
- - TS_AUTHKEY=${TS_AUTHKEY}?ephemeral=false
- - TS_EXTRA_ARGS=--advertise-tags=tag:container --reset
- - TS_STATE_DIR=/var/lib/tailscale
- - TS_SERVE_CONFIG=/config/immich.json
- - TS_USERSPACE=false
- hostname: immich
- restart: unless-stopped
- env_file:
- - stack.env
- immich-server:
- container_name: immich_server
- image: ghcr.io/immich-app/immich-server:release
- network_mode: service:immich-ts
- volumes:
- # Edit the following line to be your Immich directory on your server or NAS. e.g. /nfs/Immich
- - $INSERT NAS/FILESYSTEM MOUNT$:/usr/src/app/upload
- - /etc/localtime:/etc/localtime:ro
- env_file:
- - stack.env
- depends_on:
- - redis
- - database
- restart: unless-stopped
- immich-machine-learning:
- container_name: immich_machine_learning
- # For hardware acceleration, add one of -[armnn, cuda, openvino] to the image tag.
- # Example tag: ${IMMICH_VERSION:-release}-cuda
- image: ghcr.io/immich-app/immich-machine-learning: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, openvino, openvino-wsl] for accelerated inference - use the `-wsl` version for WSL2 where applicable
- volumes:
- - model-cache:/cache
- env_file:
- - stack.env
- restart: unless-stopped
- redis:
- container_name: immich_redis
- image: docker.io/redis:6.2-alpine@sha256:2d1463258f2764328496376f5d965f20c6a67f66ea2b06dc42af351f75248792
- restart: unless-stopped
- database:
- container_name: immich_postgres
- image: docker.io/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0
- environment:
- POSTGRES_PASSWORD: ${DB_PASSWORD}
- POSTGRES_USER: ${DB_USERNAME}
- POSTGRES_DB: ${DB_DATABASE_NAME}
- POSTGRES_INITDB_ARGS: '--data-checksums'
- 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 file
- - ${DB_DATA_LOCATION}:/var/lib/postgresql/data
- # healthcheck:
- # test: pg_isready --dbname='${DB_DATABASE_NAME}' --username='${DB_USERNAME}' || exit 1; Chksum="$$(psql --dbname='${DB_DATABASE_NAME}' --username='${DB_USERNAME}' --tuples-only --no-align --command='SELECT COALESCE(SUM(checksum_failures), 0) FROM pg_stat_database')"; echo "checksum failure count is $$Chksum"; [ "$$Chksum" = '0' ] || exit 1
- # interval: 5m
- # start_interval: 30s
- # start_period: 5m
- command: ["postgres", "-c", "shared_preload_libraries=vectors.so", "-c", 'search_path="$$user", public, vectors', "-c", "logging_collector=on", "-c", "max_wal_size=2GB", "-c", "shared_buffers=512MB", "-c", "wal_compression=on"]
- restart: unless-stopped
- volumes:
- model-cache:
- immich-ts:
- driver: local
Advertisement
Add Comment
Please, Sign In to add comment