add periodic cj that updates wrongmove data [ci skip]
This commit is contained in:
parent
8bca25f953
commit
b0ceb7efbe
1 changed files with 50 additions and 50 deletions
|
|
@ -20,7 +20,7 @@ resource "kubernetes_deployment" "realestate-crawler-ui" {
|
||||||
name = "realestate-crawler-ui"
|
name = "realestate-crawler-ui"
|
||||||
namespace = "realestate-crawler"
|
namespace = "realestate-crawler"
|
||||||
labels = {
|
labels = {
|
||||||
app = "realestate-crawler-ui"
|
app = "realestate-crawler-ui"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
spec {
|
spec {
|
||||||
|
|
@ -69,7 +69,7 @@ resource "kubernetes_service" "realestate-crawler" {
|
||||||
app = "realestate-crawler-ui"
|
app = "realestate-crawler-ui"
|
||||||
}
|
}
|
||||||
port {
|
port {
|
||||||
port = "80"
|
port = "80"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -83,52 +83,52 @@ module "ingress" {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# resource "kubernetes_cron_job_v1" "scrape-rightmove" {
|
resource "kubernetes_cron_job_v1" "scrape-rightmove" {
|
||||||
# metadata {
|
metadata {
|
||||||
# name = "scrape-rightmove"
|
name = "scrape-rightmove"
|
||||||
# namespace = "realestate-crawler"
|
namespace = "realestate-crawler"
|
||||||
# }
|
}
|
||||||
# spec {
|
spec {
|
||||||
# concurrency_policy = "Replace"
|
concurrency_policy = "Replace"
|
||||||
# failed_jobs_history_limit = 5
|
failed_jobs_history_limit = 5
|
||||||
# schedule = "0 0 * * *"
|
schedule = "0 0 * * *"
|
||||||
# starting_deadline_seconds = 10
|
starting_deadline_seconds = 10
|
||||||
# successful_jobs_history_limit = 10
|
successful_jobs_history_limit = 10
|
||||||
# job_template {
|
job_template {
|
||||||
# metadata {}
|
metadata {}
|
||||||
# spec {
|
spec {
|
||||||
# backoff_limit = 3
|
backoff_limit = 3
|
||||||
# ttl_seconds_after_finished = 10
|
ttl_seconds_after_finished = 10
|
||||||
# template {
|
template {
|
||||||
# metadata {}
|
metadata {}
|
||||||
# spec {
|
spec {
|
||||||
# container {
|
container {
|
||||||
# name = "postgresql-backup"
|
name = "scrape-rightmove"
|
||||||
# image = "postgres:16.4-bullseye"
|
image = "viktorbarzin/realestatecrawler:latest"
|
||||||
# command = ["/bin/sh", "-c", <<-EOT
|
# command = ["/bin/sh", "-c", <<-EOT
|
||||||
# export now=$(date +"%Y_%m_%d_%H_%M")
|
# export now=$(date +"%Y_%m_%d_%H_%M")
|
||||||
# PGPASSWORD=${var.postgresql_password} pg_dumpall -h immich-postgresql -U immich > /backup/dump_$now.sql
|
# PGPASSWORD=${var.postgresql_password} pg_dumpall -h immich-postgresql -U immich > /backup/dump_$now.sql
|
||||||
|
|
||||||
# # Rotate - delete last log file
|
# # Rotate - delete last log file
|
||||||
# cd /backup
|
# cd /backup
|
||||||
# find . -name "dump_*.sql" -type f -mtime +14 -delete # 14 day retention of backups
|
# find . -name "dump_*.sql" -type f -mtime +14 -delete # 14 day retention of backups
|
||||||
# EOT
|
# EOT
|
||||||
# ]
|
# ]
|
||||||
# volume_mount {
|
volume_mount {
|
||||||
# name = "postgresql-backup"
|
name = "data"
|
||||||
# mount_path = "/backup"
|
mount_path = "/app/data"
|
||||||
# }
|
}
|
||||||
# }
|
}
|
||||||
# volume {
|
volume {
|
||||||
# name = "postgresql-backup"
|
name = "data"
|
||||||
# nfs {
|
nfs {
|
||||||
# path = "/mnt/main/immich/data-immich-postgresql"
|
path = "/mnt/main/real-estate-crawler"
|
||||||
# server = "10.0.10.15"
|
server = "10.0.10.15"
|
||||||
# }
|
}
|
||||||
# }
|
}
|
||||||
# }
|
}
|
||||||
# }
|
}
|
||||||
# }
|
}
|
||||||
# }
|
}
|
||||||
# }
|
}
|
||||||
# }
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue