Repository navigation
Add Dockerfile, Docker Compose, and Enhanced (Colored) Logging with Timezone Support for Wuzapi API - #70
Merged
Conversation
This commit updates the go.sum file to include new dependencies and their respective versions. Notable changes include the addition of several packages such as , , and updates to existing packages like and . These changes ensure that the project is using the latest compatible versions of its dependencies.
…k management functions This commit modifies existing database queries in the file to use PostgreSQL's parameterized query syntax (using , , etc.) instead of the previous syntax. Additionally, it introduces new functions for managing webhooks, including , , and , enhancing the API's capabilities for user webhook management.
…ging Updated the callHookFile function to create a final payload that includes the file parameter. Enhanced logging to provide more detailed information about the payload being sent and the response received, improving traceability and debugging capabilities.
This commit updates the database connection from SQLite to PostgreSQL using the sqlx library. It introduces environment variable loading for database credentials and implements database migrations using the golang-migrate package. Additionally, logging has been improved to provide clearer error messages in both English and Portuguese.
This commit introduces two new routes for managing webhooks: a DELETE method to remove a webhook and a PUT method to update an existing webhook. These additions enhance the webhook functionality and provide more flexibility for users interacting with the API.
…fication This commit introduces new endpoints for user management under , allowing for listing, adding, and deleting users. Additionally, it enhances the webhook functionality with endpoints for setting, updating, and deleting webhooks, along with detailed descriptions and response examples for each operation. The API specification is now more comprehensive, providing clearer guidance for developers integrating with the API.
…ling Refactored the database interactions in to utilize the package for enhanced query capabilities. Updated SQL statements to use positional parameters and improved error handling for JSON marshaling when calling webhooks. Additionally, increased the HTTP client timeout from 5 to 30 seconds to enhance reliability during network operations.
adjust update removing comma
Update wmiau.go
Update wmiau.go
fork update
feat: Send global presence
feat: Added Proxy support.
fix: Adjust indentation of static/api/spec.yml
…_TOKEN Esta alteração inclui: - Modificação no main.go para criar usuário admin com token da variável de ambiente - Atualização da documentação no README.md e API.md - Adição de informações sobre endpoints administrativos - Tradução e melhorias na página de login - Atualização da coleção Postman com descrições detalhadas - Melhorias na documentação Swagger (spec.yml) Agora o sistema cria automaticamente um usuário 'admin' na primeira execução, usando o token configurado em WUZAPI_ADMIN_TOKEN, simplificando o processo de configuração inicial e melhorando a experiência do usuário.
…entation of WuzAPI improvements PT-BR: - Refatoração do sistema de autenticação com separação entre admin e usuários comuns - Novo painel de gerenciamento (Manager Dashboard) com listagem completa de instâncias - Estatísticas em tempo real (total de instâncias, conectadas, desconectadas) - Navegação por abas para acesso a todas as funcionalidades (webhooks, mensagens, grupos, etc) - Correção do problema que desconectava instâncias durante o gerenciamento - Melhorias de integração com todos os endpoints existentes da API - Otimização do fluxo de verificação de status das instâncias - Interface responsiva para dispositivos móveis - Indicadores visuais de status para cada instância - Próximos passos incluem métricas avançadas, debug e monitoramento em tempo real EN: - Authentication system refactoring with separation between admin and regular users - New management dashboard with complete instance listing - Real-time statistics (total instances, connected, disconnected) - Tab navigation for accessing all features (webhooks, messages, groups, etc) - Fixed issue that disconnected instances during management - Improved integration with all existing API endpoints - Optimized instance status verification flow - Responsive interface for mobile devices - Visual status indicators for each instance - Next steps include advanced metrics, debugging and real-time monitoring
maxHSG
pushed a commit
to maxHSG/wuzapi
that referenced
this pull request
Jan 28, 2026
Add Dockerfile, Docker Compose, and Enhanced (Colored) Logging with Timezone Support for Wuzapi API
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Descrição (Português)
Esta Pull Request introduz as seguintes melhorias e configurações para a API Wuzapi:
Dockerfile:
golang:1.23-alpine3.20para compilar o binário da API, instalando as dependências necessárias (comogcc,musl-devegcompat).alpine:3.20, instala os pacotes essenciais para a execução da aplicação, incluindotzdatapara suporte a timezones.TZcomo"America/Sao_Paulo".ENTRYPOINTpara iniciar o binário com as flags--logtype=console --color=true, garantindo que os logs sejam exibidos em formato de console colorido.Docker Compose:
8080.postgres:15e configura o banco de dados com as variáveis de ambiente apropriadas.Aprimoramentos no Código (main.go):
zerologpara registrar as mensagens, com suporte à saída em JSON ou em console.--color=true, os logs são exibidos com cores diferenciadas para cada nível (DEBUG, INFO, WARN, ERROR, etc.) e com timestamps formatados conforme o fuso horário definido.TZe ajustatime.Localde acordo, garantindo que os logs e operações de tempo usem o fuso horário correto.Description (English)
This Pull Request introduces the following improvements and configurations for the Wuzapi API:
Dockerfile:
golang:1.23-alpine3.20image to compile the API binary, installing the necessary build dependencies (such asgcc,musl-dev, andgcompat).alpine:3.20image, installs the essential packages for running the application, includingtzdatafor timezone support.TZto"America/Sao_Paulo".ENTRYPOINTto run the binary with the flags--logtype=console --color=true, ensuring that logs are displayed in a colored console format.Docker Compose:
8080.postgres:15image and configures the database with the appropriate environment variables.Code Enhancements (main.go):
zerologfor logging, supporting both JSON and console output.--color=true, logs are displayed with different colors for each log level (DEBUG, INFO, WARN, ERROR, etc.) and timestamps formatted according to the configured timezone.TZenvironment variable and setstime.Localaccordingly, ensuring that log timestamps and time-based operations use the correct timezone.Instruções / Final Instructions
Build da Imagem / Build the Image:
Subir os Serviços / Start the Services:
Verificar os Logs / Check the Logs:
--color=true) e os timestamps estarão formatados conforme o timezone configurado.--color=true), and timestamps will be formatted according to the configured timezone.Arquivos Completos / Complete Files
Dockerfile
docker-compose.yml