Configuration for immich server

This commit is contained in:
shockrah 2024-05-22 20:26:54 -07:00
parent f2b066b408
commit c10174c32d
5 changed files with 54 additions and 0 deletions

View File

@ -36,6 +36,7 @@ locals {
},
{ name = "www.shockrah.xyz", records = [ var.vultr_host ] },
{ name = "resume.shockrah.xyz", records = [ var.vultr_host ] },
{ name = "immich.shockrah.xyz", records = [ "45.32.92.196" ] },
]
}

View File

@ -0,0 +1,21 @@
# Here we define the resources for our temporary immich server
resource vultr_instance immich {
plan = var.host.plan
region = var.host.region
os_id = var.host.os
enable_ipv6 = true
# Enable backups for now since we're getting off of s3 as well at some point
backups = "enabled"
backups_schedule {
type = "weekly"
dow = var.host.backups.day
hour = var.host.backups.hour
}
ssh_key_ids = [ vultr_ssh_key.immich.id ]
firewall_group_id = vultr_firewall_group.host.id
}

View File

@ -0,0 +1,11 @@
server {
listen 80;
server_name immich.shockrah.xyz;
location / {
proxy_pass http://127.0.0.1:2283/;
}
}

View File

@ -13,3 +13,11 @@ output vultr_key_id {
value = aws_iam_access_key.vultr.id
}
output immich_key {
sensitive = true
# value = tls_private_key.host.private_key_openssh
value = vultr_instance.immich.default_password
}

View File

@ -7,3 +7,16 @@ resource vultr_ssh_key host {
name = "static_ssh_key"
ssh_key = tls_private_key.host.public_key_openssh
}
####################
# Immich keys #
####################
resource tls_private_key immich {
algorithm = "RSA"
rsa_bits = 4096
}
resource vultr_ssh_key immich {
name = "static_ssh_key"
ssh_key = tls_private_key.immich.public_key_openssh
}