https://github.com/sercheo87/working-with-microservices-in-go
https://github.com/sercheo87/working-with-microservices-in-go
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/sercheo87/working-with-microservices-in-go
- Owner: sercheo87
- Created: 2023-02-04T17:49:15.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-02-13T01:22:35.000Z (over 2 years ago)
- Last Synced: 2025-01-29T05:28:52.144Z (4 months ago)
- Language: Go
- Size: 11.6 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Microservice in go
## Introduction
-
📚 [Course Build highly available, scalable, resilient distributed applications using Go](https://novopayment.udemy.com/course/working-with-microservices-in-go)This is a simple microservice in go. It is a simple REST API that returns a JSON object with a message.
- [Web Frontend](http://localhost/)
- [Mail hog](http://localhost:8025/)## Installation
- [Installation](https://grpc.io/docs/protoc-installation/)
- [gRPC Protobuf](https://github.com/protocolbuffers/protobuf/releases)## Develop
Generate the protobuf files
```bash
cd logger-service/logs
protoc --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative logs.proto
```Build Caddy
```bash
cd project
docker build -f caddy.dockerfile -t tsawler/caddy:1.0.0 .
```### Swarm
Init the swarm
```bash
swarm init
```Deploy the stack
```bash
cd project
stack deploy -c .\swarm.yml myapp
```Up scale the service
```bash
docker service scale myapp_authentication-service=3
```Delete stack
```bash
stack rm myapp
```Exit the swarm
```bash
swarm leave
```Force exit the swarm
```bash
swarm leave --force
```