decided to delete postiz 4ever

This commit is contained in:
Luigi Oliveira 2024-10-29 02:29:48 -03:00
parent 604bb284d7
commit a8b07bb36d
4 changed files with 0 additions and 158 deletions

View file

@ -1,77 +0,0 @@
job "postizz" {
datacenters = ["dc"]
type = "service"
group "postizz" {
count = 1
update {
healthy_deadline = "15m"
progress_deadline = "20m"
}
network {
port "postizz" {
static = 5000
to = 5000
}
}
restart {
attempts = 2
interval = "5m"
delay = "30s"
mode = "delay"
}
task "postizz" {
driver = "docker"
config {
image = "ghcr.io/gitroomhq/postiz-app:amd64-1729871118"
ports = ["postizz"]
volumes = [
"${NOMAD_ALLOC_DIR}/postiz-config:/config/",
"${NOMAD_ALLOC_DIR}/postiz-uploads:/uploads/"
]
}
resources {
memory_max = 3024
}
env {
MAIN_URL = "https://${URL}"
FRONTEND_URL = "https://${URL}"
NEXT_PUBLIC_BACKEND_URL = "https://${URL}/api"
JWT_SECRET = "${JWT_SECRET}"
DATABASE_URL = "postgresql://${POSTGREE_USER}:${POSTGREE_PASSWORD}@${POSTGREE_ENDPOINT}:5432/${POSTGREE_DATABASE}"
REDIS_URL = "redis://${REDIS_ENPOINT}"
BACKEND_INTERNAL_URL = "http://localhost:3000"
IS_GENERAL = "true"
STORAGE_PROVIDER = "local"
UPLOAD_DIRECTORY = "/uploads"
NEXT_PUBLIC_UPLOAD_DIRECTORY = "/uploads"
}
service {
name = "postizz"
port = "postizz"
provider = "nomad"
check {
name = "postiz-check"
type = "tcp"
port = "postizz"
interval = "10s"
timeout = "3s"
}
}
logs {
max_files = 5
max_file_size = 15
}
}
}
}

View file

@ -1,25 +0,0 @@
resource "postgresql_database" "postiz_database" {
name = var.postgree_database
owner = var.postgree_user
lc_collate = "C"
connection_limit = -1
allow_connections = true
alter_object_ownership = true
}
resource "nomad_job" "app" {
jobspec = templatefile("${path.module}/conf/postiz.hcl", {
NOMAD_ALLOC_DIR = "/alloc"
URL = var.url
POSTGREE_ENDPOINT = var.postgree_endpoint
POSTGREE_USER = var.postgree_user
POSTGREE_PASSWORD = var.postgree_password
POSTGREE_DATABASE = var.postgree_database
REDIS_ENPOINT = var.redis_endpoint
JWT_SECRET = var.jwt_secret
depends_on = postgresql_database.postiz_database
})
}

View file

@ -1,22 +0,0 @@
terraform {
required_providers {
nomad = {
source = "hashicorp/nomad"
version = "2.0.0-rc.1"
}
postgresql = {
source = "cyrilgdn/postgresql"
version = "1.24.0"
}
}
required_version = ">= 0.14"
}
provider "postgresql" {
host = var.postgree_endpoint
port = 5432
username = var.postgree_user
password = var.postgree_password
sslmode = "disable"
connect_timeout = 15
}

View file

@ -1,34 +0,0 @@
variable "url" {
type = string
description = "Caddy url for potiz"
}
variable "postgree_endpoint" {
type = string
description = "Postgree host for potiz"
}
variable "postgree_user" {
type = string
description = "Postgree username for potiz"
}
variable "postgree_password" {
type = string
description = "Postgree password for potiz"
}
variable "postgree_database" {
type = string
description = "Postgree database for potiz"
}
variable "redis_endpoint" {
type = string
description = "Redis host for potiz"
}
variable "jwt_secret" {
type = string
description = "JWT token for potiz"
}