https://github.com/saefullohmaslul/golang-example
:zap: Golang Clean Boilerplate
https://github.com/saefullohmaslul/golang-example
docker docker-compose golang rest-api test testing
Last synced: 11 months ago
JSON representation
:zap: Golang Clean Boilerplate
- Host: GitHub
- URL: https://github.com/saefullohmaslul/golang-example
- Owner: saefullohmaslul
- Created: 2020-04-27T06:26:56.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-03-07T02:46:20.000Z (over 3 years ago)
- Last Synced: 2024-11-15T00:33:17.123Z (over 1 year ago)
- Topics: docker, docker-compose, golang, rest-api, test, testing
- Language: Go
- Homepage:
- Size: 374 KB
- Stars: 19
- Watchers: 3
- Forks: 9
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Golang Clean Boilerplate
## Requirements
- [Docker](https://www.docker.com/)
- [Docker Compose](https://docs.docker.com/compose/)
## Feature
- Clean code
- Docker and docker-compose
- ORM with gorm
- Unit testing
## Setup
### Building and running the dockerized codebase
1. Clone the repository.
1. Build all containers using `docker-compose build --no-cache`.
1. Run all containers using `docker-compose up`.
**Tips**:
- Use `--build` in `docker-compose` to force update the docker image created, e.g. `docker-compose up --build`
1. The docker and docker compose will setup all requirements on the fly, and please provide coffee as this may take a few minutes.
1. If have finished it, that means you can use this server with all databases and data ready to use.
### Cleaning up
1. When you're done, `Ctrl-C` in the main `docker-compose up` window to terminate the running processes.
1. Run `docker-compose down` to stop and remove containers.
## Develop By
## License
Copyright (c) 2021 Saefulloh Maslul
All rights reserved.
