Deploy immich public proxy

This commit is contained in:
Jake Howard 2025-04-06 09:01:13 +01:00
parent b45f0ed2ae
commit 7bc4077971
Signed by: jake
GPG key ID: 57AFB45680EDD477
4 changed files with 41 additions and 4 deletions

View file

@ -1,5 +1,3 @@
services:
immich-server:
container_name: immich_server
@ -58,11 +56,28 @@ services:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
POSTGRES_DB: immich
POSTGRES_INITDB_ARGS: '--data-checksums'
POSTGRES_INITDB_ARGS: --data-checksums
volumes:
- /mnt/speed/dbs/postgres/immich:/var/lib/postgresql/data
restart: unless-stopped
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"]
# yamllint disable-line rule:quoted-strings rule:line-length
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]
immich-public-proxy:
image: alangrainger/immich-public-proxy:latest
user: "{{ docker_user.id }}"
restart: unless-stopped
environment:
- IMMICH_URL=http://immich-server:2283
volumes:
- ./ipp-config.json:/app/config.json:ro
labels:
- traefik.enable=true
- traefik.http.routers.immich-public-proxy.rule=Host(`photos.jakehoward.tech`)
- traefik.http.services.immich-public-proxy-immich.loadbalancer.server.port=3000
networks:
- default
- traefik
networks:
traefik:

View file

@ -0,0 +1,6 @@
{
"ipp": {
"showHomePage": false,
"allowDownloadAll": 1
}
}

View file

@ -13,3 +13,11 @@
owner: "{{ docker_user.name }}"
validate: docker-compose -f %s config
notify: restart immich
- name: Install IPP config
template:
src: files/ipp-config.json
dest: /opt/immich/ipp-config.json
mode: "{{ docker_compose_file_mask }}"
owner: "{{ docker_user.name }}"
notify: restart immich

View file

@ -285,6 +285,14 @@ resource "cloudflare_record" "jakehowardtech_immich" {
ttl = 1
}
resource "cloudflare_record" "jakehowardtech_photos" {
zone_id = cloudflare_zone.jakehowardtech.id
name = "photos"
value = cloudflare_record.sys_domain_pve.hostname
type = "CNAME"
ttl = 1
}
resource "cloudflare_record" "jakehowardtech_caa" {
zone_id = cloudflare_zone.jakehowardtech.id
name = "@"