move wrongmove to use db and set redis parameters [ci skip]
This commit is contained in:
parent
b641b2e9fe
commit
66a56ea2ba
5 changed files with 46 additions and 8 deletions
3
main.tf
3
main.tf
|
|
@ -101,6 +101,7 @@ variable "dawarich_database_password" {}
|
|||
variable "geoapify_api_key" {}
|
||||
variable "tandoor_database_password" {}
|
||||
variable "n8n_postgresql_password" {}
|
||||
variable "realestate_crawler_db_password" {}
|
||||
|
||||
# data "terraform_remote_state" "foo" {
|
||||
# backend = "kubernetes"
|
||||
|
|
@ -415,6 +416,8 @@ module "kubernetes_cluster" {
|
|||
tandoor_email_password = var.mailserver_accounts["info@viktorbarzin.me"]
|
||||
|
||||
n8n_postgresql_password = var.n8n_postgresql_password
|
||||
|
||||
realestate_crawler_db_password = var.realestate_crawler_db_password
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -81,6 +81,7 @@ variable "geoapify_api_key" {}
|
|||
variable "tandoor_database_password" {}
|
||||
variable "tandoor_email_password" {}
|
||||
variable "n8n_postgresql_password" {}
|
||||
variable "realestate_crawler_db_password" {}
|
||||
|
||||
variable "defcon_level" {
|
||||
type = number
|
||||
|
|
@ -619,9 +620,15 @@ module "n8n" {
|
|||
module "real-estate-crawler" {
|
||||
source = "./real-estate-crawler"
|
||||
tls_secret_name = var.tls_secret_name
|
||||
db_password = var.realestate_crawler_db_password
|
||||
}
|
||||
|
||||
module "tor-proxy" {
|
||||
source = "./tor-proxy"
|
||||
tls_secret_name = var.tls_secret_name
|
||||
}
|
||||
|
||||
# module "onlyoffice" {
|
||||
# source = "./onlyoffice"
|
||||
# tls_secret_name = var.tls_secret_name
|
||||
# }
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
variable "tls_secret_name" {}
|
||||
variable "db_password" {}
|
||||
|
||||
resource "kubernetes_namespace" "realestate-crawler" {
|
||||
metadata {
|
||||
|
|
@ -115,9 +116,32 @@ resource "kubernetes_deployment" "realestate-crawler-api" {
|
|||
container {
|
||||
name = "realestate-crawler-ui"
|
||||
image = "viktorbarzin/realestatecrawler:latest"
|
||||
env {
|
||||
name = "ENV"
|
||||
value = "prod"
|
||||
}
|
||||
env {
|
||||
name = "DB_CONNECTION_STRING"
|
||||
value = "mysql://wrongmove:${var.db_password}@mysql.dbaas.svc.cluster.local:3306/wrongmove"
|
||||
|
||||
}
|
||||
|
||||
env {
|
||||
name = "CELERY_BROKER_URL"
|
||||
value = "redis://redis.redis.svc.cluster.local:6379/0"
|
||||
}
|
||||
env {
|
||||
name = "CELERY_RESULT_BACKEND"
|
||||
value = "redis://redis.redis.svc.cluster.local:6379/1"
|
||||
}
|
||||
|
||||
env {
|
||||
name = "UVICORN_LOG_LEVEL"
|
||||
value = "debug"
|
||||
}
|
||||
port {
|
||||
name = "http"
|
||||
container_port = 8000
|
||||
container_port = 5001
|
||||
protocol = "TCP"
|
||||
}
|
||||
volume_mount {
|
||||
|
|
@ -151,7 +175,7 @@ resource "kubernetes_service" "realestate-crawler-api" {
|
|||
}
|
||||
port {
|
||||
port = 80
|
||||
target_port = 8000
|
||||
target_port = 5001
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -242,13 +266,17 @@ resource "kubernetes_cron_job_v1" "scrape-rightmove" {
|
|||
EOT
|
||||
]
|
||||
env {
|
||||
name = "HTTP_PROXY"
|
||||
value = "http://tor-proxy.tor-proxy:8118"
|
||||
}
|
||||
env {
|
||||
name = "HTTPS_PROXY"
|
||||
value = "http://tor-proxy.tor-proxy:8118"
|
||||
name = "DB_CONNECTION_STRING"
|
||||
value = "mysql://wrongmove:wrongmove@mysql.dbaas.svc.cluster.local:3306/wrongmove"
|
||||
}
|
||||
# env {
|
||||
# name = "HTTP_PROXY"
|
||||
# value = "http://tor-proxy.tor-proxy:8118"
|
||||
# }
|
||||
# env {
|
||||
# name = "HTTPS_PROXY"
|
||||
# value = "http://tor-proxy.tor-proxy:8118"
|
||||
# }
|
||||
volume_mount {
|
||||
name = "data"
|
||||
mount_path = "/app/data"
|
||||
|
|
|
|||
Binary file not shown.
BIN
terraform.tfvars
BIN
terraform.tfvars
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue