Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: implement docker containerization #15

Merged
merged 12 commits into from
Feb 15, 2024
Merged

feat: implement docker containerization #15

merged 12 commits into from
Feb 15, 2024

Conversation

Harish-osmosys
Copy link
Contributor

@Harish-osmosys Harish-osmosys commented Feb 15, 2024

Running Docker Containers

Screenshot 2024-02-15 040224

Swagger

Screenshot 2024-02-15 040246

Database

Screenshot 2024-02-15 040501

Running application using Dev Container

Screenshot 2024-02-15 155541

Summary by CodeRabbit

Summary by CodeRabbit

  • New Features
    • Added Docker support for setting up the development environment.
    • Enhanced application configuration for better service management and API exploration.
  • Bug Fixes
    • Fixed a typo in the authentication route from "regiser" to "register."
  • Documentation
    • Updated the README with a comprehensive project overview, refined development setup instructions, and added details for Docker setup and API testing.
  • Chores
    • Introduced a .dockerignore file to optimize Docker builds by excluding unnecessary directories.
    • Ensured appsettings.json is always copied to the output directory for consistent application configuration.

Copy link
Contributor

coderabbitai bot commented Feb 15, 2024

Warning

Rate Limit Exceeded

@Harish-osmosys has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 18 minutes and 49 seconds before requesting another review.

How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.
Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.
Please see our FAQ for further information.

Commits Files that changed from the base of the PR and between 3d8bc6d and d640ec5.

Walkthrough

These updates enhance a .NET application's Docker and development setup, focusing on improving the build process, fixing a typo in an authentication controller, updating project configurations, and refining the documentation. The changes streamline the Docker build context, refine the application's setup in Docker, correct a crucial endpoint typo, ensure important configuration files are correctly handled, and improve the project's README for better clarity and setup guidance.

Changes

File(s) Summary
.dockerignore, Dockerfile, .devcontainer/Dockerfile Excludes bin/ and obj/ directories from Docker build context. Sets up .NET development environment, including EF Core tools, and updates for Visual Studio Code development container.
.../Controllers/AuthenticationController.cs Fixes typo in route attribute from regiser to register.
.../DotnetFoundation.Api.csproj, Program.cs, DotnetFoundation.Application.csproj Updates to include appsettings.json with CopyToOutputDirectory set to Always. Configures application base path, adds JSON file to configuration settings, and updates target frameworks and package references.
README.md Updates project overview, development setup, and Docker setup instructions.

🐇✨
In the realm of code, where changes abound,
A rabbit hopped, leaving marks on the ground.
"Fix here, tweak there," it cheerfully said,
With Docker and .NET, no developer shall dread.
Through files and lines, its journey did weave,
A tale of progress, in which all believe.
🌟🐾

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share

Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit-tests for this file.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit tests for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository from git and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit tests.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 6ce680b and 24861a1.
Files ignored due to path filters (3)
  • DotnetFoundation/DotnetFoundation.Api/Properties/launchSettings.json is excluded by: !**/*.json
  • DotnetFoundation/DotnetFoundation.Api/appsettings.json is excluded by: !**/*.json
  • docker-compose.yaml is excluded by: !**/*.yaml
Files selected for processing (6)
  • .dockerignore (1 hunks)
  • Dockerfile (1 hunks)
  • DotnetFoundation/DotnetFoundation.Api/Controllers/AuthenticationController.cs (1 hunks)
  • DotnetFoundation/DotnetFoundation.Api/DotnetFoundation.Api.csproj (1 hunks)
  • DotnetFoundation/DotnetFoundation.Api/Program.cs (1 hunks)
  • README.md (3 hunks)
Files skipped from review due to trivial changes (3)
  • .dockerignore
  • DotnetFoundation/DotnetFoundation.Api/Controllers/AuthenticationController.cs
  • README.md
Additional comments: 3
DotnetFoundation/DotnetFoundation.Api/DotnetFoundation.Api.csproj (1)
  • 23-27: The change to always copy appsettings.json to the output directory is correctly implemented and aligns with best practices for .NET applications.
Dockerfile (1)
  • 1-32: - Ensure the base image mcr.microsoft.com/dotnet/sdk:7.0 is the most appropriate for the project's requirements.
  • Verify the wait-for-it script's source for security and reliability.
  • Confirm the database update script in the entrypoint is aligned with the project's database management strategy.
DotnetFoundation/DotnetFoundation.Api/Program.cs (1)
  • 7-9: Setting the application's base path and adding appsettings.json to the configuration settings are correctly implemented and follow best practices for ASP.NET Core applications.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Status

Actionable comments generated: 3

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 24861a1 and f1e6189.
Files selected for processing (2)
  • .devcontainer/devcontainer.json (1 hunks)
  • .devcontainer/docker-compose.yml (1 hunks)
Additional comments: 3
.devcontainer/docker-compose.yml (1)
  • 16-16: The volume mount path ..:/workspaces:cached may not work as expected if the docker-compose file is not located at the project root. Verify the relative path to ensure it correctly mounts the project folder.
.devcontainer/devcontainer.json (2)
  • 9-10: The reference to "../docker-compose.yaml" may be incorrect or misleading, as the standard naming convention is docker-compose.yml. Verify the file name and path to ensure it correctly points to the intended Docker Compose file.
  • 19-19: The workspaceFolder configuration uses a variable ${localWorkspaceFolderBasename} that might not resolve as expected in all contexts. Confirm that this variable correctly resolves to the intended directory name in your setup.

.devcontainer/docker-compose.yml Outdated Show resolved Hide resolved
.devcontainer/docker-compose.yml Outdated Show resolved Hide resolved
.devcontainer/devcontainer.json Outdated Show resolved Hide resolved
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Status

Actionable comments generated: 4

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between f1e6189 and bc4f7cb.
Files selected for processing (9)
  • .devcontainer/Dockerfile (1 hunks)
  • .devcontainer/devcontainer.json (1 hunks)
  • .devcontainer/docker-compose.yml (1 hunks)
  • Dockerfile (1 hunks)
  • DotnetFoundation/DotnetFoundation.Api/DotnetFoundation.Api.csproj (1 hunks)
  • DotnetFoundation/DotnetFoundation.Application/DotnetFoundation.Application.csproj (1 hunks)
  • DotnetFoundation/DotnetFoundation.Domain/DotnetFoundation.Domain.csproj (1 hunks)
  • DotnetFoundation/DotnetFoundation.Infrastructure/DotnetFoundation.Infrastructure.csproj (1 hunks)
  • docs/docker.md (1 hunks)
Files skipped from review as they are similar to previous changes (2)
  • .devcontainer/devcontainer.json
  • Dockerfile
Additional comments: 4
.devcontainer/Dockerfile (1)
  • 2-2: Ensure the base image version aligns with the project's .NET version requirements.
DotnetFoundation/DotnetFoundation.Application/DotnetFoundation.Application.csproj (1)
  • 8-8: Ensure all project dependencies are compatible with net8.0 and version 8.0.0 of the package.
DotnetFoundation/DotnetFoundation.Infrastructure/DotnetFoundation.Infrastructure.csproj (1)
  • 7-10: Confirm that the updated package versions are compatible with each other and with net8.0.
DotnetFoundation/DotnetFoundation.Api/DotnetFoundation.Api.csproj (1)
  • 17-19: Correct approach to ensure appsettings.json is available in the output directory for configuration management.

.devcontainer/Dockerfile Show resolved Hide resolved
.devcontainer/docker-compose.yml Show resolved Hide resolved
.devcontainer/docker-compose.yml Show resolved Hide resolved
docs/docker.md Outdated Show resolved Hide resolved
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Status

Actionable comments generated: 1

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between bc4f7cb and 3d8bc6d.
Files ignored due to path filters (1)
  • docker-compose.yaml is excluded by: !**/*.yaml
Files selected for processing (5)
  • .devcontainer/Dockerfile (1 hunks)
  • .env (1 hunks)
  • .github/workflows/build.yml (1 hunks)
  • README.md (3 hunks)
  • docs/docker.md (1 hunks)
Files skipped from review due to trivial changes (1)
  • .github/workflows/build.yml
Files skipped from review as they are similar to previous changes (3)
  • .devcontainer/Dockerfile
  • README.md
  • docs/docker.md

.env Outdated Show resolved Hide resolved
@sameer-s-b sameer-s-b merged commit fb2cc98 into main Feb 15, 2024
1 check passed
@sameer-s-b sameer-s-b deleted the docker-setup branch February 15, 2024 12:32
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.

2 participants