Skip to content

Latest commit

 

History

History
221 lines (167 loc) · 11.1 KB

readme-go.md

File metadata and controls

221 lines (167 loc) · 11.1 KB

project-logo

DOCKER-GS-PING

Deploy. Ping. Simplified. Docker-gs-ping.

license last-commit repo-top-language repo-language-count

Developed with the software and tools below.

Docker GitHub%20Actions Go

Table of Contents

📍 Overview

The docker-gs-ping project is a Dockerized Go application that leverages the Echo framework to create an HTTP server with basic endpoints. The project's core functionality includes building, testing, and deploying the application using multistage Dockerfiles. It incorporates middleware for logging and recovery, along with a custom integer minimum function. The repository includes automated CI/CD workflows for testing and deployment, ensuring the application's integrity. With its streamlined Docker container deployment and robust testing processes, docker-gs-ping offers a reliable solution for building and scaling Go web applications efficiently.


📦 Features

Feature Description
⚙️ Architecture The project follows a containerized architecture using Docker, with a focus on building and deploying a Go application with exposed port 8080 for listening. It includes a multistage Dockerfile for efficient image builds.
🔩 Code Quality The codebase maintains good quality and style with unit tests for basic and table-driven scenarios. Includes middleware setup for logging and recovery and a focus on accurate functionality.
📄 Documentation The project provides good documentation, including a detailed go.mod file defining dependencies, Dockerfile descriptions, test scenarios, and automated CI/CD workflows using GitHub Actions.
🔌 Integrations Key integrations and dependencies include Echo v4, jwt, gommon, and more for building an HTTP server. External integrations like GitHub Actions streamline testing and deployment processes.
🧩 Modularity The codebase is modular and reusable, evident from the structured setup of endpoints, middleware, and the integer minimum function implementation. Promotes code reusability and scalability.
🧪 Testing Unit tests are implemented for ensuring accurate functionality of the codebase. Testing frameworks and tools used for validating the IntMin function and overall system integrity.
⚡️ Performance Efficiently handles resource usage with a multistage Dockerfile for building, testing, and deploying. Employs middleware for logging and recovery, ensuring a fast and reliable HTTP server setup.
🛡️ Security Security measures include dependency checksums generated from go.sum for Docker image builds, ensuring secure and reliable deployment. Integrations like jwt provide additional security features.
📦 Dependencies Key external libraries and dependencies include Echo v4, jwt, gommon, crypto packages, among others. Dependency management via go.mod and go.sum files for streamlined builds.

📂 Repository Structure

└── docker-gs-ping/
    ├── .github
    │   └── workflows
    ├── Dockerfile
    ├── Dockerfile.multistage
    ├── LICENSE
    ├── README.md
    ├── go.mod
    ├── go.sum
    ├── main.go
    └── main_test.go

🧩 Modules

.
File Summary
go.mod Docker-gs-ping's go.mod defines dependencies for Echo v4, jwt, gommon, and more.
Dockerfile Builds a Go application in a Docker container, enabling easy deployment with exposed port 8080 for listening.
go.sum Generates dependencies checksums from go.sum for Docker image builds in the parent repository.
Dockerfile.multistage Multistage Dockerfile for building, testing, and deploying Go application into a minimal image with distroless base.
main.go Implements an HTTP server using Echo framework with basic endpoints. Includes middleware setup for logging and recovery. Incorporated integer minimum function.
main_test.go Unit tests for basic and table-driven scenarios, ensuring accurate functionality of the IntMin function within the repository's architecture.
.github.workflows
File Summary
ci-cd.yml Automated CI/CD workflows configured for the Dockerized Go application using GitHub Actions. Streamlines testing and deployment processes.
ci-smoketest.yml Automated CI smoketest workflow ensures the Dockerized Go application's functionality and integrity.

🚀 Getting Started

Requirements

Ensure you have the following dependencies installed on your system:

  • Go: version x.y.z

⚙️ Install

  1. Clone the docker-gs-ping repository:
git clone https://github.com/olliefr/docker-gs-ping
  1. Change to the project directory:
cd docker-gs-ping
  1. Install the dependencies:
go build -o myapp

► Using docker-gs-ping

Use the following command to run docker-gs-ping:

./myapp

🧪 Tests

Use the following command to run tests:

go test

🛠 Project Roadmap

  • ► INSERT-TASK-1
  • ► INSERT-TASK-2
  • ► ...

🤝 Contributing

Contributions are welcome! Here are several ways you can contribute:

Contributing Guidelines
  1. Fork the Repository: Start by forking the project repository to your github account.
  2. Clone Locally: Clone the forked repository to your local machine using a git client.
    git clone https://github.com/olliefr/docker-gs-ping
  3. Create a New Branch: Always work on a new branch, giving it a descriptive name.
    git checkout -b new-feature-x
  4. Make Your Changes: Develop and test your changes locally.
  5. Commit Your Changes: Commit with a clear message describing your updates.
    git commit -m 'Implemented new feature x.'
  6. Push to github: Push the changes to your forked repository.
    git push origin new-feature-x
  7. Submit a Pull Request: Create a PR against the original project repository. Clearly describe the changes and their motivations.
  8. Review: Once your PR is reviewed and approved, it will be merged into the main branch. Congratulations on your contribution!
Contributor Graph


📄 License

This project is protected under the SELECT-A-LICENSE License. For more details, refer to the LICENSE file.


👏 Acknowledgments

  • List any resources, contributors, inspiration, etc. here.

Return