Skip to content

wp#14

Merged
1batu merged 15 commits intoDigitalCoreHub:mainfrom
1batu:main
Nov 10, 2025
Merged

wp#14
1batu merged 15 commits intoDigitalCoreHub:mainfrom
1batu:main

Conversation

@1batu
Copy link
Member

@1batu 1batu commented Nov 10, 2025

This pull request introduces several infrastructure and backend improvements to support deployment on Fly.io and Vercel, along with new API features and environment-based configuration for the frontend. The main themes are: Fly.io deployment enhancements, improved database migration handling, new news API endpoints, and frontend environment variable support for seamless deployment.

Deployment and Infrastructure:

  • Added a comprehensive .dockerignore file to prevent unnecessary files from being included in Docker builds, improving build performance and image size.
  • Updated fly.toml with new app name, region, deploy strategy, and resource settings for Fly.io deployment.
  • Modified Dockerfile to copy the migrations directory into the image and create an empty .env file for compatibility with Fly.io secrets.
  • Added detailed documentation for Fly.io database migrations (docs/flyio-migrations.md) and frontend deployment on Vercel (docs/frontend-deployment.md). [1] [2]

Backend: Database and News Service:

  • In main.go, database migrations are now run automatically at startup, ensuring the schema is up to date. News aggregator intervals and cache TTLs are validated and defaulted for robustness. [1] [2]
  • Introduced a new NewsHandler with endpoints to trigger news fetching and retrieve the latest news articles, and registered these endpoints in the API routes. [1] [2] [3] [4]

Frontend: Environment-Based Configuration:

  • All API and WebSocket URLs in the frontend now use environment variables (NEXT_PUBLIC_API_URL, NEXT_PUBLIC_WS_URL), enabling seamless deployment to environments like Vercel without code changes. A new frontend/lib/config.ts helper was added. [1] [2] [3] [4] [5] [6]

These changes collectively improve deployment flexibility, operational reliability, and add new backend capabilities for news aggregation and retrieval.

1batu added 15 commits November 9, 2025 22:19
Added a .dockerignore file for Docker builds and updated .gitignore to exclude sensitive Fly.io credentials. The fly.toml configuration was updated for a new app name, region, and improved service settings. The config loader in Go now supports parsing DATABASE_URL and REDIS_URL, falling back to individual variables, and no longer errors if the .env file is missing.
Creates an empty .env file during image build to satisfy the application's expectation for its presence, even though environment variables are provided by Fly.io secrets.
Replaced hardcoded API and WebSocket URLs with environment variable-based configuration throughout Dashboard, Leaderboard, and marketContext. Added a new config.ts utility for managing and cleaning API/WS URLs. This improves flexibility for different deployment environments.
Introduces embedded SQL migrations and a migration runner in Go, enabling automatic database schema setup and updates on server start. Adds detailed migration files for trading, reasoning, news, agent stats, data sources, and dynamic stock universe. Updates Dockerfile to include migrations in the build, and updates server startup to run migrations before initializing other services. Also adds deployment and migration documentation for Fly.io and Vercel.
Add database migrations and auto-migration support
Introduced helper functions to provide default values for integer and float configuration options if environment variables are unset or zero. Updated News, AI, Leaderboard, and DataSources config parsing to use these defaults, ensuring more robust startup. Improved RSS feed parsing and interval handling in main.go, including whitespace trimming and minimum interval enforcement.
Add default values for config intervals and improve parsing
Introduces a new SQL script to add the DeepSeek Chat agent to the agents table, initialize its metrics, and verify its creation.
Update news_handler.go
Update news_aggregator.go
@1batu 1batu merged commit d67a735 into DigitalCoreHub:main Nov 10, 2025
2 checks passed
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.

1 participant