implemented compose by url, parse, local yaml.
This commit is contained in:
1 parent
53695f4fff
commit
784fff8faf
218 files changed
+2271
-640
No files matched your search
@@ -0,0 +1 @@
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
---
|
||||
- name: restart immich
|
||||
community.docker.docker_compose_v2:
|
||||
project_src: "{{ immich_dir }}"
|
||||
state: restarted
|
||||
|
||||
+16
-41
@@ -11,44 +11,19 @@
|
||||
- "{{ immich_upload_location }}"
|
||||
tags: [immich]
|
||||
|
||||
- name: Render Immich environment
|
||||
ansible.builtin.template:
|
||||
src: env.j2
|
||||
dest: "{{ immich_dir }}/.env"
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0600"
|
||||
no_log: true
|
||||
tags: [immich, config]
|
||||
|
||||
- name: Ensure Immich proxy network exists
|
||||
community.docker.docker_network:
|
||||
name: "{{ immich_traefik_network }}"
|
||||
state: present
|
||||
when: immich_routing_mode == "traefik"
|
||||
tags: [immich, docker]
|
||||
|
||||
- name: Render Immich Compose file
|
||||
ansible.builtin.template:
|
||||
src: compose.yaml.j2
|
||||
dest: "{{ immich_dir }}/compose.yaml"
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0644"
|
||||
notify: restart immich
|
||||
tags: [immich, compose]
|
||||
|
||||
- name: Allow Immich ports
|
||||
community.general.ufw:
|
||||
rule: allow
|
||||
port: "{{ item }}"
|
||||
proto: tcp
|
||||
loop: "{{ immich_tcp_ports }}"
|
||||
when: immich_routing_mode == "host"
|
||||
tags: [immich, firewall]
|
||||
|
||||
- name: Start Immich
|
||||
community.docker.docker_compose_v2:
|
||||
project_src: "{{ immich_dir }}"
|
||||
state: present
|
||||
tags: [immich, compose]
|
||||
- name: Deploy Immich Compose project
|
||||
ansible.builtin.include_role:
|
||||
name: compose_project
|
||||
vars:
|
||||
compose_project_dir: "{{ immich_dir }}"
|
||||
compose_project_directories:
|
||||
- "{{ immich_dir }}"
|
||||
- "{{ immich_upload_location }}"
|
||||
compose_project_env_template_src: "{{ playbook_dir }}/../roles/immich/templates/env.j2"
|
||||
compose_project_compose_template_src: "{{ playbook_dir }}/../roles/immich/templates/compose.yaml.j2"
|
||||
compose_project_override_template_src: "{{ playbook_dir }}/../roles/immich/templates/compose.override.yaml.j2"
|
||||
compose_project_create_proxy_network: "{{ immich_routing_mode == 'traefik' }}"
|
||||
compose_project_proxy_network: "{{ immich_traefik_network }}"
|
||||
compose_project_firewall_ports: "{{ immich_tcp_ports }}"
|
||||
compose_project_firewall_enabled: "{{ immich_routing_mode in ['host', 'traefik_file'] }}"
|
||||
tags: [immich]
|
||||
@@ -0,0 +1,6 @@
|
||||
services:
|
||||
immich-server: {}
|
||||
immich-machine-learning: {}
|
||||
redis: {}
|
||||
database: {}
|
||||
|
||||
@@ -3,9 +3,9 @@ services:
|
||||
image: {{ immich_server_image }}
|
||||
restart: unless-stopped
|
||||
env_file: .env
|
||||
{% if immich_routing_mode == "host" %}
|
||||
{% if immich_routing_mode in ["host", "traefik_file"] %}
|
||||
ports:
|
||||
- "{{ immich_http_port }}:2283"
|
||||
- "{{ nbops_traefik_file_bind_address if immich_routing_mode == 'traefik_file' else '0.0.0.0' }}:{{ immich_http_port }}:2283"
|
||||
{% endif %}
|
||||
{% if immich_routing_mode == "traefik" %}
|
||||
# internal HTTP service port: 2283; not published on the Docker host
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
# Upstream Snapshot
|
||||
|
||||
This directory stores copied upstream reference files for the `immich` role.
|
||||
|
||||
See `docs/upstream-sources.yml` for repository URLs, refs, README paths, Compose paths, and verification status.
|
||||
|
||||
Snapshot files are reference material only. Deployments are generated from this role's `templates/` directory.
|
||||
Reference in new issue
Block a user