feat: introduce immich
This commit is contained in:
@@ -0,0 +1,62 @@
|
||||
---
|
||||
services:
|
||||
immich-server:
|
||||
container_name: immich_server
|
||||
image: {{ immich_server_image }}:{{ immich_version }}
|
||||
networks:
|
||||
- databases
|
||||
- immich
|
||||
extra_hosts:
|
||||
- "{{ immich_postgres_host }}:{{ podman_subnet_gateway }}"
|
||||
- "{{ immich_valkey_host }}:{{ podman_subnet_gateway }}"
|
||||
volumes:
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- {{ immich_upload_location }}:/data:rw,Z
|
||||
environment:
|
||||
DB_HOSTNAME: {{ immich_postgres_host }}
|
||||
DB_PORT: {{ immich_postgres_port }}
|
||||
DB_USERNAME: {{ immich_postgres_user }}
|
||||
DB_PASSWORD: {{ immich_postgres_password }}
|
||||
DB_DATABASE_NAME: {{ immich_postgres_db_name }}
|
||||
REDIS_HOSTNAME: {{ immich_valkey_host }}
|
||||
REDIS_PORT: {{ immich_valkey_port }}
|
||||
REDIS_USERNAME: {{ immich_valkey_user }}
|
||||
REDIS_PASSWORD: {{ immich_valkey_password }}
|
||||
REDIS_DBINDEX: {{ immich_valkey_db }}
|
||||
IMMICH_MACHINE_LEARNING_URL: http://immich-machine-learning:3003
|
||||
UPLOAD_LOCATION: {{ immich_upload_location }}
|
||||
TZ: {{ immich_timezone }}
|
||||
ports:
|
||||
- "{{ immich_port }}:2283"
|
||||
restart: always
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "curl -f http://localhost:2283/api/server/ping"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 60s
|
||||
|
||||
immich-machine-learning:
|
||||
container_name: immich_machine_learning
|
||||
image: {{ immich_ml_image }}:{{ immich_version }}
|
||||
networks:
|
||||
- immich
|
||||
volumes:
|
||||
- model-cache:/cache
|
||||
restart: always
|
||||
healthcheck:
|
||||
test: ["CMD", "python", "/usr/src/healthcheck.py"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 60s
|
||||
|
||||
networks:
|
||||
databases:
|
||||
name: podman
|
||||
external: true
|
||||
immich:
|
||||
driver: bridge
|
||||
|
||||
volumes:
|
||||
model-cache:
|
||||
@@ -0,0 +1,16 @@
|
||||
[Unit]
|
||||
Description=Immich Media Server
|
||||
Requires=network-online.target
|
||||
After=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=true
|
||||
WorkingDirectory={{ podman_projects_dir }}/immich
|
||||
ExecStart=/usr/bin/podman compose up -d
|
||||
ExecStop=/usr/bin/podman compose down
|
||||
Restart=on-failure
|
||||
RestartSec=10
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,23 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name {{ immich_nginx_hostname }};
|
||||
|
||||
client_max_body_size 50000M;
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:{{ immich_port }};
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
|
||||
# WebSocket support
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
|
||||
# Timeouts for large file uploads
|
||||
proxy_read_timeout 600s;
|
||||
proxy_send_timeout 600s;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user