Setup storage of immich resouces and add tailscale access to allow uploading files too large to go over cloudflare (<100mb) See https://github.com/immich-app/immich/issues/17729 and https://github.com/immich-app/immich/pull/22385
This commit is contained in:
@@ -29,7 +29,8 @@ resource "postgresql_extension" "immich_earthdistance" {
|
||||
resource "nomad_variable" "immich" {
|
||||
path = "nomad/jobs/immich"
|
||||
items = {
|
||||
database_pw = data.sops_file.secrets.data["immich.database_pw"]
|
||||
database_pw = data.sops_file.secrets.data["immich.database_pw"]
|
||||
tailscale_oauthsecret = data.sops_file.secrets.data["tailscale.oauthsecret"]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,3 +59,82 @@ resource "nomad_csi_volume_registration" "unraid_appdata_immich" {
|
||||
"password" = data.sops_file.secrets.data["unraid.nomad"]
|
||||
}
|
||||
}
|
||||
|
||||
resource "nomad_csi_volume_registration" "unraid_media_photosvideos" {
|
||||
#Note: Before chaning the definition of this volume you need to stop the jobs that are using it
|
||||
depends_on = [data.nomad_plugin.smb]
|
||||
plugin_id = "smb"
|
||||
|
||||
volume_id = "unraid_media_photosvideos"
|
||||
name = "unraid_media_photosvideos"
|
||||
|
||||
external_id = "unraid_media_photosvideos"
|
||||
|
||||
capability {
|
||||
access_mode = "single-node-writer"
|
||||
attachment_mode = "file-system"
|
||||
}
|
||||
|
||||
context = {
|
||||
source = "//192.168.1.192/media"
|
||||
subDir = "Photos and Videos" # Note: Needs to be manually created on the share
|
||||
}
|
||||
|
||||
secrets = {
|
||||
"username" = "nomad"
|
||||
"password" = data.sops_file.secrets.data["unraid.nomad"]
|
||||
}
|
||||
}
|
||||
|
||||
resource "nomad_csi_volume_registration" "unraid_media_immich_encodedvideo" {
|
||||
#Note: Before chaning the definition of this volume you need to stop the jobs that are using it
|
||||
depends_on = [data.nomad_plugin.smb]
|
||||
plugin_id = "smb"
|
||||
|
||||
volume_id = "unraid_media_immich_encodedvideo"
|
||||
name = "unraid_media_immich_encodedvideo"
|
||||
|
||||
external_id = "unraid_media_immich_encodedvideo"
|
||||
|
||||
capability {
|
||||
access_mode = "single-node-writer"
|
||||
attachment_mode = "file-system"
|
||||
}
|
||||
|
||||
context = {
|
||||
source = "//192.168.1.192/media"
|
||||
subDir = "immich/encoded-video" # Note: Needs to be manually created on the share
|
||||
}
|
||||
|
||||
secrets = {
|
||||
"username" = "nomad"
|
||||
"password" = data.sops_file.secrets.data["unraid.nomad"]
|
||||
}
|
||||
}
|
||||
|
||||
resource "nomad_csi_volume_registration" "unraid_mediadump_photosvideos" {
|
||||
#Note: Before chaning the definition of this volume you need to stop the jobs that are using it
|
||||
depends_on = [data.nomad_plugin.smb]
|
||||
plugin_id = "smb"
|
||||
|
||||
volume_id = "unraid_mediadump_photosvideos"
|
||||
name = "unraid_mediadump_photosvideos"
|
||||
|
||||
external_id = "unraid_mediadump_photosvideos"
|
||||
|
||||
capability {
|
||||
access_mode = "single-node-writer"
|
||||
attachment_mode = "file-system"
|
||||
}
|
||||
|
||||
context = {
|
||||
source = "//192.168.1.192/media-dump"
|
||||
subDir = "Photos and Videos" # Note: Needs to be manually created on the share
|
||||
}
|
||||
|
||||
secrets = {
|
||||
"username" = "nomad"
|
||||
"password" = data.sops_file.secrets.data["unraid.nomad"]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user