feat: Implement CI/CD with Docker and add logging#1
Merged
Conversation
This commit introduces the following changes: 1. **Logging:** Added `ILogger` to `NetworkController.cs` to log key events such as login attempts, CRUD operations on network assets, and errors. This will improve traceability and debugging capabilities. 2. **Dockerfile:** Included a `Dockerfile` in the repository root to enable containerization of the ASP.NET Core application. This allows for consistent deployment environments and simplifies scaling. 3. **GitHub Actions Workflow:** Created a workflow in `.github/workflows/docker-publish.yml` to automate the building and pushing of the Docker image to Docker Hub. The workflow triggers on pushes to the main branch and can also be run manually. It uses a Docker Hub token stored as `DOCKERHUB_TOKEN` in GitHub secrets. These changes set up a basic CI/CD pipeline for the application, containerizing it and automating its publication to Docker Hub.
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 commit introduces the following changes:
Logging: Added
ILoggertoNetworkController.csto log key events such as login attempts, CRUD operations on network assets, and errors. This will improve traceability and debugging capabilities.Dockerfile: Included a
Dockerfilein the repository root to enable containerization of the ASP.NET Core application. This allows for consistent deployment environments and simplifies scaling.GitHub Actions Workflow: Created a workflow in
.github/workflows/docker-publish.ymlto automate the building and pushing of the Docker image to Docker Hub. The workflow triggers on pushes to the main branch and can also be run manually. It uses a Docker Hub token stored asDOCKERHUB_TOKENin GitHub secrets.These changes set up a basic CI/CD pipeline for the application, containerizing it and automating its publication to Docker Hub.