Skip to main content

4 posts tagged with "changed"

View All Tags

ยท 2 min read
Cleber Wilson

2.1.2โ€‹

Changedโ€‹

Documentation for Logging: Database Deployment Optimization and Docker Image Buildingโ€‹

Introductionโ€‹

This documentation details the optimization implemented in the database deployment process, which consequently facilitated the construction of the Docker image for the application. This procedure is an essential part of ensuring efficient and safe deployment of the application in a container environment.

File Structure and Scriptsโ€‹

  1. Schema files (.prisma):

    • mongodb-schema.prisma, mysql-schema.prisma, postgresql-schema.prisma: Define the schemas of the MongoDB, MySQL and PostgreSQL databases, respectively.
    • Function: Structure the database according to the chosen provider.
  2. Configuration File (.env.dev):

    • Contains the environment variables, including database settings.
    • Function: Provides crucial information for connecting and configuring the database.
  3. Dockerfile:

    • Defines the instructions for building the application's Docker image.
    • Function: Uses environment variables to configure the application, including connection to the database.
  4. Database Operation Scripts (.sh):

    • env_functions.sh: Manipulates and exports environment variables.
    • run_database_operation_deploy.sh, run_database_operation_generate.sh, run_database_operation_migrate.sh: Execute database deployment, generation and migration operations.
    • setup_database_url.sh: Configures the database URL.
    • Function: Automate the configuration process and database operations.

Optimizations Implementedโ€‹

  1. Database Configuration Automation:

    • The implementation of scripts such as setup_database_url.sh and env_functions.sh automated the configuration of database connection variables, reducing manual errors and speeding up the setup process.
  2. Integration with Dockerfile:

    • .env.dev environment variables are embedded in the Dockerfile, ensuring that the built Docker image is aligned with the database configurations.
    • This integration ensures consistency between the development and production environment.
  3. Flexibility in Schema Management:

    • The use of specific schema files for each type of database (MongoDB, MySQL, PostgreSQL) in the prisma directory allows flexibility and ease in migrating or changing the database.
  4. Database Operation Scripts:

    • Scripts like run_database_operation_migrate.sh facilitate critical operations such as migrations, making them an integral part of the CI/CD process, which reduces deployment time and possible failures.

Conclusionโ€‹

Optimization of the database deployment process and integration with Docker image construction provided a more efficient and reliable workflow. These improvements not only speed up the deployment process, but also ensure that the application is always synchronized with the database settings, regardless of the execution environment. This procedure is a clear example of how automation and good configuration management can positively impact the software development lifecycle.

ยท 2 min read
Cleber Wilson

For full details, visit the official API documentation: Official Documentation 1.3.0.

Version 1.3.0 (2023-12-09)โ€‹

This version features significant improvements, including migration to the PostgreSQL database, integration with Prisma ORM, and new storage and interaction features.

Addedโ€‹

  • ๐Ÿ†•๐Ÿ’พ Migration to PostgreSQL: Replacement of MongoDB with PostgreSQL for more robust and efficient data management. Check out the detailed instructions and benefits of this change in commits [9b574ec], [7b2389f].
  • ๐Ÿ†•๐Ÿ”ท Prisma ORM: Introduction of Prisma ORM, offering an additional layer of abstraction and security for database operations. More details at [a2474ed].
  • ๐Ÿ†•๐Ÿ”— Integration with MinIO: Implementation of media storage with MinIO, providing a scalable and efficient solution. See [e71a9f9].
  • ๐Ÿ†•๐Ÿ”— Integration with Typebot: New endpoints and services for interaction with Typebot, expanding the API's capabilities. Details at [88f2d1b].

Changedโ€‹

  • ๐Ÿ›๐Ÿ’ฅ Redis Reconfiguration: Improvement in the code that saves instances in Redis, increasing reliability and efficiency. See [0b16a32].
  • ๐Ÿ”„๐Ÿ’ป๐Ÿ› ๏ธ General Code Refactoring: Optimizations and code improvements to increase performance and maintainability. Details at [ba667a9].

Migrating from 1.2 to 1.3โ€‹

Migration Steps:โ€‹

  1. Test Environment: It is recommended to create a test environment to validate new features. Compare versions 1.2.8 and 1.3.0.
  2. PostgreSQL Database: Required for the new version. Configuration and migration instructions available in the documentation.
  3. Saving Logs to the Database: All logs are now saved to the database for better analysis and traceability.
  4. .env file: Replacement of the YAML environment variables file with a .env file to simplify configuration.
  5. Redis Save Refactoring: The code was restructured to avoid bugs and improve performance.
  6. Improved Request Responses: Responses now provide more detailed information from the bank.
  7. Webhook Sending Detailed Data: The data sent by the webhook is more complete and informative.

Detailed Integrations:โ€‹

  • MinIO: Detailed settings and usage in the .env.dev file.
  • Typebot: Environment variables and application-specific interactions for the scope of the bot:
    {
    "messageId": 1325, // unique message id in the database
    "keyRemoteJid": "[email protected]", // WhatsApp phone number
    "keyId": "KDFKJRGLGR51VR5", // WhatsApp message id
    "messageType": "conversation", // message source type
    "pushName": "Name", // WhatsApp account name
    "instanceId": 12 // id of the WhatsApp instance linked to the API
    }

Feedback and Supportโ€‹

We encourage feedback on this release. For support or suggestions, contact us through our official channels.

ยท 2 min read
Cleber Wilson

2.1.2โ€‹

Changedโ€‹

Documentation for Logging: Database Deployment Optimization and Docker Image Buildingโ€‹

Introductionโ€‹

This documentation details the optimization implemented in the database deployment process, which consequently facilitated the construction of the Docker image for the application. This procedure is an essential part of ensuring efficient and safe deployment of the application in a container environment.

File Structure and Scriptsโ€‹

  1. Schema files (.prisma):

    • mongodb-schema.prisma, mysql-schema.prisma, postgresql-schema.prisma: Define the schemas of the MongoDB, MySQL and PostgreSQL databases, respectively.
    • Function: Structure the database according to the chosen provider.
  2. Configuration File (.env.dev):

    • Contains the environment variables, including database settings.
    • Function: Provides crucial information for connecting and configuring the database.
  3. Dockerfile:

    • Defines the instructions for building the application's Docker image.
    • Function: Uses environment variables to configure the application, including connection to the database.
  4. Database Operation Scripts (.sh):

    • env_functions.sh: Manipulates and exports environment variables.
    • run_database_operation_deploy.sh, run_database_operation_generate.sh, run_database_operation_migrate.sh: Execute database deployment, generation and migration operations.
    • setup_database_url.sh: Configures the database URL.
    • Function: Automate the configuration process and database operations.

Optimizations Implementedโ€‹

  1. Database Configuration Automation:

    • The implementation of scripts such as setup_database_url.sh and env_functions.sh automated the configuration of database connection variables, reducing manual errors and speeding up the setup process.
  2. Integration with Dockerfile:

    • .env.dev environment variables are embedded in the Dockerfile, ensuring that the built Docker image is aligned with the database configurations.
    • This integration ensures consistency between the development and production environment.
  3. Flexibility in Schema Management:

    • The use of specific schema files for each type of database (MongoDB, MySQL, PostgreSQL) in the prisma directory allows flexibility and ease in migrating or changing the database.
  4. Database Operation Scripts:

    • Scripts like run_database_operation_migrate.sh facilitate critical operations such as migrations, making them an integral part of the CI/CD process, which reduces deployment time and possible failures.

Conclusionโ€‹

Optimization of the database deployment process and integration with Docker image construction provided a more efficient and reliable workflow. These improvements not only speed up the deployment process, but also ensure that the application is always synchronized with the database settings, regardless of the execution environment. This procedure is a clear example of how automation and good configuration management can positively impact the software development lifecycle.

ยท One min read
Cleber Wilson

2.1.2โ€‹

Addedโ€‹

  • ๐Ÿ†•๐Ÿ’ฌ New property that enables quoting messages in chatwoot. [ed12fe7]
  • ๐Ÿ†•๐Ÿ”— MinIO integration to improve object storage in the API. [41262dd] [d5959b9]
  • ๐Ÿ†•๐Ÿ”— Integration with typebot - endpoints and services. [8970188]

Changedโ€‹

  • ๐Ÿ›๐Ÿ’ฅ name property limitation adjustment. [31feb72]
  • ๐Ÿ”„๐Ÿ”—๐Ÿ“Š Compatibility tables with added integrations. [14100e1]
  • ๐Ÿณ๐Ÿ—๏ธ Database Deployment Optimization and Docker Image Building. [014c30e]
  • ๐Ÿ”„โž• Reorganization and addition of documentation. [aad0f4a] [c644953]
  • ๐Ÿ”„๐Ÿค– Code refactoring to meet compatibility with Typebot.
  • โž•๐Ÿค– Adding and adjusting dependencies for compatibility with Typebot. [bb65466]
  • ๐Ÿ”„โž• Reorganization and addition of documentation. [67c893b]
  • ๐Ÿ’พ Saving http logs. [d0a37e6]
  • ๐Ÿ”„๐Ÿ“ฅ Refactoring and updated imports in the media.handler.ts file. [3f255f5]
  • ๐Ÿš€ Streams - memory optimization, speed and scalability for large volumes of data. [607c0dd]