An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

          


Go

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



Saefulloh Maslul

## License

Copyright (c) 2021 Saefulloh Maslul
All rights reserved.