_Built with:_
I. 📍 Overview II. 👾 Features III. 📁 Project Structure IV. 🚀 Getting Started V. 📌 Project Roadmap VI. 🔰 Contributing VII. 🎗 License VIII. 🙌 Acknowledgments
docker-gs-ping is a project that simplifies deploying a Go application in a Docker container. It offers easy scalability and efficient testing. Ideal for developers seeking streamlined containerized application deployment.
Feature | Summary | |
---|---|---|
⚙️ | Architecture |
|
🔩 | Code Quality |
|
📄 | Documentation |
|
🔌 | Integrations |
|
🧩 | Modularity |
|
🧪 | Testing |
|
⚡️ | Performance |
|
🛡️ | Security |
|
└── docker-gs-ping/
├── .github
│ └── workflows
│ ├── ci-cd.yml
│ └── ci-smoketest.yml
├── Dockerfile
├── Dockerfile.multistage
├── LICENSE
├── README.md
├── go.mod
├── go.sum
├── main.go
└── main_test.go
DOCKER-GS-PING/
__root__
go.mod Define project dependencies and versions using the go.mod file, ensuring proper package management and compatibility within the codebase architecture. Dockerfile - Facilitates building and running a Go application in a Docker container
- Downloads Go modules, copies source code, builds the application, and exposes port 8080 for runtime communication
- Allows easy deployment and scaling of the application within a containerized environment.go.sum Manage project dependencies and versions using the provided go.sum file, ensuring compatibility and stability across the codebase architecture. Dockerfile.multistage - Builds, tests, and deploys a Go application in a multi-stage Docker process
- Fetches dependencies, compiles the application, runs tests, and packages it into a minimal container image
- The resulting image exposes port 8080 and runs the application as a non-root user.main.go - Implements a basic HTTP server using the Echo framework with middleware for logging and recovery
- Defines routes for root and health endpoints
- Retrieves the port from the environment variable or defaults to 8080
- Starts the server on the specified port
- Includes a function for finding the minimum of two integers.main_test.go - Unit tests in main_test.go verify the correctness of the IntMin function through basic and table-driven scenarios
- These tests ensure that the function accurately determines the minimum value between two integers.
.github
workflows
ci-cd.yml - Automates Docker image release to Docker Hub based on successful tests, following a CI/CD workflow triggered by pushes to the main branch or version tags
- Handles Docker image metadata, caching, build, test, login, and push operations securely using GitHub Actions.ci-smoketest.yml - Automates smoke testing for the project by building and testing Go code on every push or manual trigger
- Uses GitHub Actions to streamline the process in the CI pipeline.
Before getting started with docker-gs-ping, ensure your runtime environment meets the following requirements:
- Programming Language: Go
- Package Manager: Go modules
- Container Runtime: Docker
Install docker-gs-ping using one of the following methods:
Build from source:
- Clone the docker-gs-ping repository:
❯ git clone https://github.com/olliefr/docker-gs-ping
- Navigate to the project directory:
❯ cd docker-gs-ping
- Install the project dependencies:
❯ go build
❯ docker build -t olliefr/docker-gs-ping .
Run docker-gs-ping using the following command:
Using go modules
❯ go run {entrypoint}
❯ docker run -it {image_name}
Run the test suite using the following command:
Using go modules
❯ go test ./...
-
Task 1
:Implement feature one. -
Task 2
: Implement feature two. -
Task 3
: Implement feature three.
- 💬 Join the Discussions: Share your insights, provide feedback, or ask questions.
- 🐛 Report Issues: Submit bugs found or log feature requests for the
docker-gs-ping
project. - 💡 Submit Pull Requests: Review open PRs, and submit your own PRs.
Contributing Guidelines
- Fork the Repository: Start by forking the project repository to your github account.
- Clone Locally: Clone the forked repository to your local machine using a git client.
git clone https://github.com/olliefr/docker-gs-ping
- Create a New Branch: Always work on a new branch, giving it a descriptive name.
git checkout -b new-feature-x
- Make Your Changes: Develop and test your changes locally.
- Commit Your Changes: Commit with a clear message describing your updates.
git commit -m 'Implemented new feature x.'
- Push to github: Push the changes to your forked repository.
git push origin new-feature-x
- Submit a Pull Request: Create a PR against the original project repository. Clearly describe the changes and their motivations.
- Review: Once your PR is reviewed and approved, it will be merged into the main branch. Congratulations on your contribution!
This project is protected under the SELECT-A-LICENSE License. For more details, refer to the LICENSE file.
- List any resources, contributors, inspiration, etc. here.