Merged
Conversation
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
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.
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:
.dockerignorefile to prevent unnecessary files from being included in Docker builds, improving build performance and image size.fly.tomlwith new app name, region, deploy strategy, and resource settings for Fly.io deployment.Dockerfileto copy themigrationsdirectory into the image and create an empty.envfile for compatibility with Fly.io secrets.docs/flyio-migrations.md) and frontend deployment on Vercel (docs/frontend-deployment.md). [1] [2]Backend: Database and News Service:
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]NewsHandlerwith 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:
NEXT_PUBLIC_API_URL,NEXT_PUBLIC_WS_URL), enabling seamless deployment to environments like Vercel without code changes. A newfrontend/lib/config.tshelper 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.