This is a pet project that support multiple environments and cover some of the essential parts of backend development in microservice architecture such as API development, database, in-memory data store, containerization, and container orchestration.
- Duplicate file
internal/app/config.example.yaml
asinternal/app/config.yaml
- Update
config.yaml
file with your own credentials - Create new database schema
authentication
- Run
go mod vendor
- Run
go run main.go
- Duplicate file
internal/app/config.example.yaml
asinternal/app/config.yaml
- Update
config.yaml
file with your own credentials - Update
docker-compose.yaml
as well if needed - Run
docker-compose up
- Duplicate file
internal/app/config.example.yaml
asinternal/app/config.yaml
- Update
config.yaml
with your own credentials - Make sure you already logged in to your docker hub or any other registry using
docker login
- Run
make docker-build USERNAME="<YOUR_USERNAME>" VERSION="<DESIRED_IMAGE_VERSION>"
to build your image and push it to the registry - Update
spec.template.spec.containers[0].image
value to the same value you used on 4th step ink8s/auth-deployment.yaml
file - [Optional] If you change port mapping, make sure you update
k8s/auth-service.yaml
file as well - Run
make k8s-deploy
To clear all data, you only need to run make k8s-destroy
[MIT] (https://github.com/ffauzann/authentication/blob/main/LICENSE)