mirror of
https://github.com/lingble/twenty.git
synced 2025-10-29 20:02:29 +00:00
We will remove the `twenty-postgres` image that was used for local development and only use `twenty-postgres-pilo` (which we use in prod), bringing the development environment closer to prod and avoiding having to maintain 2 images. Instead of provisioning the super user after the db initialization, we directly rely on the superuser provided by Spilo for simplicity. We also introduce a change that tries to create the right database (`default` or `test`) based on the context. How to test: ``` docker build -t twentycrm/twenty-postgres-spilo:latest -f ./packages/twenty-docker/twenty-postgres-spilo/Dockerfile . docker images --no-trunc | grep twenty-postgres-spilo postgres-on-docker: docker run \ --name twenty_pg \ -e PGUSER_SUPERUSER=twenty \ -e PGPASSWORD_SUPERUSER=twenty \ -e ALLOW_NOSSL=true \ -v twenty_db_data:/home/postgres/pgdata \ -p 5432:5432 \ REPLACE_WITH_IMAGE_ID ```
137 lines
4.1 KiB
HCL
137 lines
4.1 KiB
HCL
######################
|
|
# Required Variables #
|
|
######################
|
|
variable "twentycrm_pgdb_admin_password" {
|
|
type = string
|
|
description = "TwentyCRM password for postgres database."
|
|
sensitive = true
|
|
}
|
|
|
|
variable "twentycrm_app_hostname" {
|
|
type = string
|
|
description = "The protocol, DNS fully qualified hostname, and port used to access TwentyCRM in your environment. Ex: https://crm.example.com:443"
|
|
}
|
|
|
|
######################
|
|
# Optional Variables #
|
|
######################
|
|
variable "twentycrm_app_name" {
|
|
type = string
|
|
default = "twentycrm"
|
|
description = "A friendly name prefix to use for every component deployed."
|
|
}
|
|
|
|
variable "twentycrm_server_image" {
|
|
type = string
|
|
default = "twentycrm/twenty:latest"
|
|
description = "TwentyCRM server image for the server deployment. This defaults to latest. This value is also used for the workers image."
|
|
}
|
|
|
|
variable "twentycrm_db_image" {
|
|
type = string
|
|
default = "twentycrm/twenty-postgres-spilo:latest"
|
|
description = "TwentyCRM image for database deployment. This defaults to latest."
|
|
}
|
|
|
|
variable "twentycrm_server_replicas" {
|
|
type = number
|
|
default = 1
|
|
description = "Number of replicas for the TwentyCRM server deployment. This defaults to 1."
|
|
}
|
|
|
|
variable "twentycrm_worker_replicas" {
|
|
type = number
|
|
default = 1
|
|
description = "Number of replicas for the TwentyCRM worker deployment. This defaults to 1."
|
|
}
|
|
|
|
variable "twentycrm_db_replicas" {
|
|
type = number
|
|
default = 1
|
|
description = "Number of replicas for the TwentyCRM database deployment. This defaults to 1."
|
|
}
|
|
|
|
variable "twentycrm_server_data_mount_path" {
|
|
type = string
|
|
default = "/app/packages/twenty-server/.local-storage"
|
|
description = "TwentyCRM mount path for servers application data. Defaults to '/app/packages/twenty-server/.local-storage'."
|
|
}
|
|
|
|
variable "twentycrm_db_pv_path" {
|
|
type = string
|
|
default = ""
|
|
description = "Local path to use to store the physical volume if using local storage on nodes."
|
|
}
|
|
|
|
variable "twentycrm_server_pv_path" {
|
|
type = string
|
|
default = ""
|
|
description = "Local path to use to store the physical volume if using local storage on nodes."
|
|
}
|
|
|
|
variable "twentycrm_db_pv_capacity" {
|
|
type = string
|
|
default = "10Gi"
|
|
description = "Storage capacity provisioned for database persistent volume."
|
|
}
|
|
|
|
variable "twentycrm_db_pvc_requests" {
|
|
type = string
|
|
default = "10Gi"
|
|
description = "Storage capacity reservation for database persistent volume claim."
|
|
}
|
|
|
|
variable "twentycrm_server_pv_capacity" {
|
|
type = string
|
|
default = "10Gi"
|
|
description = "Storage capacity provisioned for server persistent volume."
|
|
}
|
|
|
|
variable "twentycrm_server_pvc_requests" {
|
|
type = string
|
|
default = "10Gi"
|
|
description = "Storage capacity reservation for server persistent volume claim."
|
|
}
|
|
|
|
variable "twentycrm_namespace" {
|
|
type = string
|
|
default = "twentycrm"
|
|
description = "Namespace for all TwentyCRM resources"
|
|
}
|
|
|
|
variable "twentycrm_redis_replicas" {
|
|
type = number
|
|
default = 1
|
|
description = "Number of replicas for the TwentyCRM Redis deployment. This defaults to 1."
|
|
}
|
|
|
|
variable "twentycrm_redis_image" {
|
|
type = string
|
|
default = "redis/redis-stack-server:latest"
|
|
description = "TwentyCRM image for Redis deployment. This defaults to latest."
|
|
}
|
|
|
|
variable "twentycrm_docker_data_mount_path" {
|
|
type = string
|
|
default = "/app/docker-data"
|
|
description = "TwentyCRM mount path for servers application data. Defaults to '/app/docker-data'."
|
|
}
|
|
|
|
variable "twentycrm_docker_data_pv_path" {
|
|
type = string
|
|
default = ""
|
|
description = "Local path to use to store the physical volume if using local storage on nodes."
|
|
}
|
|
|
|
variable "twentycrm_docker_data_pv_capacity" {
|
|
type = string
|
|
default = "100Mi"
|
|
description = "Storage capacity provisioned for server persistent volume."
|
|
}
|
|
|
|
variable "twentycrm_docker_data_pvc_requests" {
|
|
type = string
|
|
default = "100Mi"
|
|
description = "Storage capacity reservation for server persistent volume claim."
|
|
}
|