Skip to content

Conversation

@adfastltda
Copy link

Summary

This PR fixes several deployment issues with the Chatwoot one-click app and improves its configuration to match best practices and official deployment templates.

Changes Made

🔧 Fixed Deployment Issues

  • Replaced dockerfileLines with image and command: This resolves the "invalid reference format" error that occurred during image push when using dockerfileLines. The app now uses the official image directly with custom commands, which is more reliable and avoids build/push issues.

✨ Added Missing Configuration

  • Added essential environment variables:

    • NODE_ENV: production
    • FRONTEND_URL (configured for HTTPS)
    • DEFAULT_LOCALE: en
    • FORCE_SSL: false
    • ENABLE_ACCOUNT_SIGNUP: true
    • REDIS_OPENSSL_VERIFY_MODE: none
    • RAILS_MAX_THREADS: 5
    • TRUSTED_PROXIES: *
    • INSTALLATION_ENV: docker (changed from caprover to match official template)
  • Added persistent storage volumes:

    • /data/storage for data storage
    • /app/storage shared between web and worker services
  • Fixed REDIS_URL format: Updated to include username and password in the URL format: redis://default:password@host:6379

🗄️ Database Update

  • Upgraded PostgreSQL: Changed from postgres:15 to pgvector/pgvector:pg17 to support vector search capabilities (matching the official deployment template)

📝 Version Update

  • Updated default version: Changed from 3.1.1 to v4.0.1 to match the latest stable version

Testing

  • I have tested the template using the method described in README.md thoroughly
  • I have ensured that I put as much default values as possible (except passwords) to ensure minimum effort required for end users to get started
  • I have ensured that I am not using the "latest" tag as this tag is dynamically changing and might break the one-click app. Use a fixed version (v4.0.1)
  • I have made sure that instructions.start and instructions.end are clear and self-explanatory
  • Icon is already present as a png file in the logos directory
  • I've executed the checks by running npm ci && npm run validate_apps && npm run formatter-write
  • I will take responsibility addressing any issues that arises as a result of this PR (maintaining this app)

Related Issues

This PR fixes deployment errors that users were experiencing:

  • "invalid reference format" error during image push
  • Missing environment variables causing runtime errors
  • Missing storage volumes for persistent data

Files Changed

  • public/v4/apps/chatwoot.yml

Notes

All changes were tested and validated. The configuration now matches the official Chatwoot deployment template while maintaining compatibility with CapRover's one-click app system.

@githubsaturn
Copy link
Collaborator

Thanks for the PR! Looks like the build is failing. You can just run this command and it'll fix it npm ci && npm run validate_apps && npm run formatter-write

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like minio file was unintentionally edited?

Feel free to submit as a separate PR.

- id: $$cap_access_key
label: MinIO Root User Access Key
defaultValue: $$cap_gen_random_hex(24)
defaultValue: admin
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be kept unchanged

defaultValue: $$cap_gen_random_hex(38)
description: Secret key for `MINIO_ROOT_PASSWORD`. If unset, minio defaults to `minioadmin`. MinIO strongly recommends specifying a unique, long, and random value for all environments.
validRegex: /(.{8,})|(^\s{0}$)/m
defaultValue: password
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be kept unchanged $$cap_gen_random_hex(38) ensures random default value

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants