diff --git a/blueprints/libredesk/docker-compose.yml b/blueprints/libredesk/docker-compose.yml new file mode 100644 index 00000000..ef647ab7 --- /dev/null +++ b/blueprints/libredesk/docker-compose.yml @@ -0,0 +1,54 @@ +services: + libredesk: + image: libredesk/libredesk:latest + restart: unless-stopped + ports: + - 9000 + environment: + # If the password is set during first docker-compose up, the system user password will be set to this value. + # You can always set system user password later by running `docker exec -it libredesk_app ./libredesk --set-system-user-password`. + LIBREDESK_SYSTEM_USER_PASSWORD: ${LIBREDESK_SYSTEM_USER_PASSWORD:-} + depends_on: + - db + - redis + volumes: + - ../files/uploads:/libredesk/uploads:rw + - ../files/config.toml:/libredesk/config.toml + command: [ sh, -c, "./libredesk --install --idempotent-install --yes --config /libredesk/config.toml && ./libredesk --upgrade --yes --config /libredesk/config.toml && ./libredesk --config /libredesk/config.toml" ] + + # PostgreSQL database + db: + image: postgres:17-alpine + restart: unless-stopped + ports: + # Only bind on the local interface. To connect to Postgres externally, change this to 0.0.0.0 + - 5432 + environment: + # Set these environment variables to configure the database, defaults to libredesk. + POSTGRES_USER: ${POSTGRES_USER} + POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} + POSTGRES_DB: ${POSTGRES_DB} + healthcheck: + test: [ "CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-libredesk} -d ${POSTGRES_DB:-libredesk}" ] + interval: 10s + timeout: 5s + retries: 6 + volumes: + - postgres-data:/var/lib/postgresql/data + + # Redis + redis: + image: redis:7-alpine + restart: unless-stopped + ports: + # Only bind on the local interface. + - 6379 + volumes: + - redis-data:/data + +networks: + libredesk: + +volumes: + postgres-data: + redis-data: \ No newline at end of file diff --git a/blueprints/libredesk/libredesk.svg b/blueprints/libredesk/libredesk.svg new file mode 100644 index 00000000..a0e5d997 --- /dev/null +++ b/blueprints/libredesk/libredesk.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/blueprints/libredesk/template.toml b/blueprints/libredesk/template.toml new file mode 100644 index 00000000..6ec82266 --- /dev/null +++ b/blueprints/libredesk/template.toml @@ -0,0 +1,152 @@ +[variables] +libredesk_domain = "${domain}" + +libredesk_system_user_password = "${base64:32}" + +pg_username = "${username}" +pg_password = "${password:16}" +pg_database = "libredesk" + +[config] +env = [ + "LIBREDESK_SYSTEM_USER_PASSWORD=${libredesk_system_user_password}", + "POSTGRES_USER=${pg_username}", + "POSTGRES_PASSWORD=${pg_password}", + "POSTGRES_DB=${pg_database}", +] + +[[config.domains]] +serviceName = "libredesk" +port = 9000 +host = "${libredesk_domain}" + +[[config.mounts]] +filePath = "config.toml" +content = """ + +[app] +# Log level: info, debug, warn, error, fatal +log_level = "debug" +# Environment: dev, prod. +# Setting to "dev" will enable color logging in terminal. +env = "dev" +# Whether to automatically check for application updates on start up, app updates are shown as a banner in the admin panel. +check_updates = true + +# HTTP server. +[app.server] +# Address to bind the HTTP server to. +address = "0.0.0.0:9000" +# Unix socket path (leave empty to use TCP address instead) +socket = "" +# Do NOT disable secure cookies in production environment if you don't know exactly what you're doing! +disable_secure_cookies = false +# Request read and write timeouts. +read_timeout = "5s" +write_timeout = "5s" +# Maximum request body size in bytes (100MB) +# If you are using proxy, you may need to configure them to allow larger request bodies. +max_body_size = 104857600 +# Size of the read buffer for incoming requests +read_buffer_size = 4096 +# Keepalive settings. +keepalive_timeout = "10s" + +# File upload provider to use, either `fs` or `s3`. +[upload] +provider = "fs" + +# Filesystem provider. +[upload.fs] +# Directory where uploaded files are stored, make sure this directory exists and is writable by the application. +upload_path = 'uploads' + +# S3 provider. +[upload.s3] +# S3 endpoint URL (required only for non-AWS S3-compatible providers like MinIO). +# Leave empty to use default AWS endpoints. +url = "" + +# AWS S3 credentials, keep empty to use attached IAM roles. +access_key = "" +secret_key = "" + +# AWS region, e.g., "us-east-1", "eu-west-1", etc. +region = "ap-south-1" +# S3 bucket name where files will be stored. +bucket = "bucket-name" +# Optional prefix path within the S3 bucket where files will be stored. +# Example, if set to "uploads/media", files will be stored under that path. +# Useful for organizing files inside a shared bucket. +bucket_path = "" +# S3 signed URL expiry duration (e.g., "30m", "1h") +expiry = "30m" + +# Postgres. +[db] +# If running locally, use `localhost`. +host = "db" +# Database port, default is 5432. +port = 5432 +# Update the following values with your database credentials. +user = "${pg_username}" +password = "${pg_password}" +database = "${pg_database}" +ssl_mode = "disable" +# Maximum number of open database connections +max_open = 30 +# Maximum number of idle connections in the pool +max_idle = 30 +# Maximum time a connection can be reused before being closed +max_lifetime = "300s" + +# Redis. +[redis] +# If running locally, use `localhost:6379`. +address = "redis:6379" +password = "" +db = 0 + +[message] +# Number of workers processing outgoing message queue +outgoing_queue_workers = 10 +# Number of workers processing incoming message queue +incoming_queue_workers = 10 +# How often to scan for outgoing messages to process, keep it low to process messages quickly. +message_outgoing_scan_interval = "50ms" +# Maximum number of messages that can be queued for incoming processing +incoming_queue_size = 5000 +# Maximum number of messages that can be queued for outgoing processing +outgoing_queue_size = 5000 + +[notification] +# Number of concurrent notification workers +concurrency = 2 +# Maximum number of notifications that can be queued +queue_size = 2000 + +[automation] +# Number of workers processing automation rules +worker_count = 10 + +[autoassigner] +# How often to run automatic conversation assignment +autoassign_interval = "5m" + +[webhook] +# Number of webhook delivery workers +workers = 5 +# Maximum number of webhook deliveries that can be queued +queue_size = 10000 +# HTTP timeout for webhook requests +timeout = "15s" + +[conversation] +# How often to check for conversations to unsnooze +unsnooze_interval = "5m" + +[sla] +# How often to evaluate SLA compliance for conversations +evaluation_interval = "5m" + +""" \ No newline at end of file diff --git a/meta.json b/meta.json index 3e263e16..b99bf643 100644 --- a/meta.json +++ b/meta.json @@ -2898,6 +2898,22 @@ "productivity" ] }, + { + "id": "libredesk", + "name": "Libredesk", + "logo": "libredesk.svg", + "version": "latest", + "description": "Open source, self-hosted customer support desk. Single binary app.", + "links": { + "github": "https://github.com/abhinavxd/libredesk", + "website": "https://libredesk.io", + "docs": "https://docs.libredesk.io/introduction" + }, + "tags": [ + "storage", + "object-storage" + ] + }, { "id": "linkding", "name": "Linkding",