Update 6 files
- /group_vars/all.yml - /roles/immich/templates/.env.j2 - /roles/immich/templates/docker-compose.yml.j2 - /roles/immich/tasks/main.yml - /inventories/hosts - /olimp-deploy.yml
This commit is contained in:
parent
5e022e9b65
commit
7070c739b9
@ -114,3 +114,15 @@ mumble_ice_port: "6502"
|
|||||||
mumble_server_password: "passw0rd"
|
mumble_server_password: "passw0rd"
|
||||||
mumble_superuser_password: "13qeadZC"
|
mumble_superuser_password: "13qeadZC"
|
||||||
mumble_max_users: "100"
|
mumble_max_users: "100"
|
||||||
|
|
||||||
|
# ------------192.168.1.206 talk------------
|
||||||
|
|
||||||
|
|
||||||
|
# Immich variables
|
||||||
|
immich_base_dir: "/mnt/service/immich"
|
||||||
|
immich_port: "45135"
|
||||||
|
immich_db_username: "postgres"
|
||||||
|
immich_db_password: "postgres"
|
||||||
|
immich_db_name: "immich"
|
||||||
|
immich_version: "release"
|
||||||
|
# immich_public_url: "https://photos.yourdomain.com" # раскомментирую если нужно
|
||||||
@ -2,6 +2,7 @@
|
|||||||
gateway ansible_host=192.168.1.201 int_ip=192.168.1.201
|
gateway ansible_host=192.168.1.201 int_ip=192.168.1.201
|
||||||
data ansible_host=192.168.1.222 int_ip=192.168.1.222
|
data ansible_host=192.168.1.222 int_ip=192.168.1.222
|
||||||
media ansible_host=192.168.1.223 int_ip=192.168.1.223
|
media ansible_host=192.168.1.223 int_ip=192.168.1.223
|
||||||
|
photo ansible_host=192.168.1.224 int_ip=192.168.1.224
|
||||||
talk ansible_host=192.168.1.226 int_ip=192.168.1.226
|
talk ansible_host=192.168.1.226 int_ip=192.168.1.226
|
||||||
|
|
||||||
[gateway]
|
[gateway]
|
||||||
@ -13,5 +14,8 @@ data
|
|||||||
[media]
|
[media]
|
||||||
media
|
media
|
||||||
|
|
||||||
|
[photo]
|
||||||
|
photo
|
||||||
|
|
||||||
[talk]
|
[talk]
|
||||||
talk
|
talk
|
||||||
@ -15,12 +15,18 @@
|
|||||||
- { role: mealie, tags: deploy_mealie }
|
- { role: mealie, tags: deploy_mealie }
|
||||||
- { role: bookstack, tags: deploy_bookstack }
|
- { role: bookstack, tags: deploy_bookstack }
|
||||||
- { role: bitwarden, tags: deploy_bitwarden }
|
- { role: bitwarden, tags: deploy_bitwarden }
|
||||||
|
|
||||||
- hosts: media
|
- hosts: media
|
||||||
roles:
|
roles:
|
||||||
- { role: docker, tags: deploy_docker }
|
- { role: docker, tags: deploy_docker }
|
||||||
- { role: ampache, tags: deploy_ampache }
|
- { role: ampache, tags: deploy_ampache }
|
||||||
- { role: audiobookshelf, tags: deploy_audiobookshelf }
|
- { role: audiobookshelf, tags: deploy_audiobookshelf }
|
||||||
|
|
||||||
|
- hosts: photo
|
||||||
|
roles:
|
||||||
|
- { role: docker, tags: deploy_docker }
|
||||||
|
- { role: immich, tags: deploy_immich }
|
||||||
|
|
||||||
- hosts: talk
|
- hosts: talk
|
||||||
roles:
|
roles:
|
||||||
- { role: docker, tags: deploy_docker }
|
- { role: docker, tags: deploy_docker }
|
||||||
|
|||||||
42
roles/immich/tasks/main.yml
Normal file
42
roles/immich/tasks/main.yml
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
---
|
||||||
|
- name: Create Immich directories
|
||||||
|
file:
|
||||||
|
path: "{{ item }}"
|
||||||
|
state: directory
|
||||||
|
mode: 0755
|
||||||
|
loop:
|
||||||
|
- "{{ immich_base_dir }}"
|
||||||
|
- /mnt/immich/postgres
|
||||||
|
- /mnt/immich_upload
|
||||||
|
|
||||||
|
- name: Deploy Immich docker-compose.yml
|
||||||
|
template:
|
||||||
|
src: docker-compose.yml.j2
|
||||||
|
dest: "{{ immich_base_dir }}/docker-compose.yml"
|
||||||
|
mode: 0644
|
||||||
|
|
||||||
|
- name: Deploy Immich .env file
|
||||||
|
template:
|
||||||
|
src: .env.j2
|
||||||
|
dest: "{{ immich_base_dir }}/.env"
|
||||||
|
mode: 0644
|
||||||
|
|
||||||
|
- name: Start Immich services
|
||||||
|
shell: |
|
||||||
|
cd {{ immich_base_dir }}
|
||||||
|
docker compose up -d
|
||||||
|
args:
|
||||||
|
executable: /bin/bash
|
||||||
|
|
||||||
|
- name: Wait for services to start
|
||||||
|
pause:
|
||||||
|
seconds: 30
|
||||||
|
|
||||||
|
- name: Check Immich container status
|
||||||
|
shell: docker ps --filter name=immich
|
||||||
|
register: immich_status
|
||||||
|
changed_when: false
|
||||||
|
|
||||||
|
- name: Show Immich status
|
||||||
|
debug:
|
||||||
|
var: immich_status.stdout
|
||||||
22
roles/immich/templates/.env.j2
Normal file
22
roles/immich/templates/.env.j2
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
# You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables
|
||||||
|
|
||||||
|
# The location where your uploaded files are stored
|
||||||
|
UPLOAD_LOCATION=/mnt/immich_upload
|
||||||
|
|
||||||
|
# The location where your database files are stored. Network shares are not supported for the database
|
||||||
|
DB_DATA_LOCATION=/mnt/immich/postgres
|
||||||
|
|
||||||
|
# To set a timezone, uncomment the next line and change Etc/UTC to a TZ identifier from this list: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List
|
||||||
|
TZ={{ timezone }}
|
||||||
|
|
||||||
|
# The Immich version to use. You can pin this to a specific version like "v1.71.0"
|
||||||
|
IMMICH_VERSION={{ immich_version }}
|
||||||
|
|
||||||
|
# Connection secret for postgres. You should change it to a random password
|
||||||
|
# Please use only the characters `A-Za-z0-9`, without special characters or spaces
|
||||||
|
DB_PASSWORD={{ immich_db_password }}
|
||||||
|
|
||||||
|
# The values below this line do not need to be changed
|
||||||
|
###################################################################################
|
||||||
|
DB_USERNAME={{ immich_db_username }}
|
||||||
|
DB_DATABASE_NAME={{ immich_db_name }}
|
||||||
53
roles/immich/templates/docker-compose.yml.j2
Normal file
53
roles/immich/templates/docker-compose.yml.j2
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
name: immich
|
||||||
|
|
||||||
|
services:
|
||||||
|
immich-server:
|
||||||
|
container_name: immich_server
|
||||||
|
image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
|
||||||
|
volumes:
|
||||||
|
- ${UPLOAD_LOCATION}:/data
|
||||||
|
- /etc/localtime:/etc/localtime:ro
|
||||||
|
env_file:
|
||||||
|
- .env
|
||||||
|
ports:
|
||||||
|
- '{{ immich_port }}:2283'
|
||||||
|
depends_on:
|
||||||
|
- redis
|
||||||
|
- database
|
||||||
|
restart: always
|
||||||
|
healthcheck:
|
||||||
|
disable: false
|
||||||
|
|
||||||
|
immich-machine-learning:
|
||||||
|
container_name: immich_machine_learning
|
||||||
|
image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
|
||||||
|
volumes:
|
||||||
|
- model-cache:/cache
|
||||||
|
env_file:
|
||||||
|
- .env
|
||||||
|
restart: always
|
||||||
|
healthcheck:
|
||||||
|
disable: false
|
||||||
|
|
||||||
|
redis:
|
||||||
|
container_name: immich_redis
|
||||||
|
image: docker.io/valkey/valkey:8-bookworm@sha256:a137a2b60aca1a75130022d6bb96af423fefae4eb55faf395732db3544803280
|
||||||
|
healthcheck:
|
||||||
|
test: redis-cli ping || exit 1
|
||||||
|
restart: always
|
||||||
|
|
||||||
|
database:
|
||||||
|
container_name: immich_postgres
|
||||||
|
image: ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0@sha256:32324a2f41df5de9efe1af166b7008c3f55646f8d0e00d9550c16c9822366b4a
|
||||||
|
environment:
|
||||||
|
POSTGRES_PASSWORD: ${DB_PASSWORD}
|
||||||
|
POSTGRES_USER: ${DB_USERNAME}
|
||||||
|
POSTGRES_DB: ${DB_DATABASE_NAME}
|
||||||
|
POSTGRES_INITDB_ARGS: '--data-checksums'
|
||||||
|
volumes:
|
||||||
|
- ${DB_DATA_LOCATION}:/var/lib/postgresql/data
|
||||||
|
shm_size: 128mb
|
||||||
|
restart: always
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
model-cache:
|
||||||
Loading…
Reference in New Issue
Block a user