feat: improve first app launch experience#204
Merged
kamilbaczek merged 3 commits intomainfrom May 2, 2025
Merged
Conversation
…ocker-compose settings
…nce API documentation endpoint
There was a problem hiding this comment.
Pull Request Overview
This PR enhances the first-run experience by improving local and Docker database connectivity and automating the launch of the Swagger UI. Key changes include:
- Updating the docker-compose file to support local and Docker environments with consistent connection strings.
- Modifying Program.cs to integrate an API documentation endpoint that automatically redirects to Swagger.
- Changing the automatic migrations process to use EnsureCreated and adding a new ApiDocumentationExtensions class.
Reviewed Changes
Copilot reviewed 4 out of 6 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| Chapter-1-initial-architecture/Src/docker-compose.yml | Updated service name and environment variables to ensure proper DB connectivity. |
| Chapter-1-initial-architecture/Src/Fitnet/Program.cs | Integrated API documentation middleware for automatic Swagger redirection. |
| Chapter-1-initial-architecture/Src/Fitnet/Passes/Data/Database/AutomaticMigrationsExtensions.cs | Changed from Migrate() to EnsureCreated() for database initialization. |
| Chapter-1-initial-architecture/Src/Fitnet/Common/Documentation/SwaggerDocumentationExtensions.cs | Added a new extension to support the automated API documentation endpoint. |
Files not reviewed (2)
- Chapter-1-initial-architecture/Src/Fitnet/Fitnet.csproj: Language not supported
- Chapter-1-initial-architecture/Src/Fitnet/appsettings.Development.json: Language not supported
Chapter-1-initial-architecture/Src/Fitnet/Passes/Data/Database/AutomaticMigrationsExtensions.cs
Show resolved
Hide resolved
meaboutsoftware
approved these changes
May 2, 2025
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.
📋 Description
This PR improves the first-run experience for developers and simplifies testing and launching the solution.
🛠️ Database Connectivity:
Previously, when running the solution locally, the database connection failed due to an alias that only worked in Docker. This is now resolved—both local and Docker environments work without any additional configuration.
🌐 Swagger Availability:
Before, Swagger had to be manually located. Now, it opens automatically when navigating to the application’s root URL.
📦 PR Includes
• Improved local + Docker setup for DB connection 🔧
• Automatic Swagger UI launch 🌐
Manual Tests
local run from IDE
run on docker

