-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,3 +27,4 @@ go.work.sum | |
\#**# | ||
|
||
**.db | ||
seed.txt |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,15 @@ | ||
# coffee-shop | ||
# AutoCoffee - a NATS based microservices demo | ||
|
||
This is a simple demo of a microservices architecture using NATS as the messaging system. The demo is based on a "coffee shop" scenario where clients can order coffee in an automated way. | ||
|
||
# Architecture | ||
|
||
The demo consists of the following components: | ||
- `routes` - a service that exposes a web interface for clients to order coffee. | ||
- `controller` - a service that receives the orders from the `routes` service, check the stock (using the `stock` service) and send the order to `coffee-makers` services. | ||
- `stock` - a service that keeps track of the stock of coffee beans in a database. | ||
- `coffee-makers` - a service that receives the orders from the `controller` service and makes the coffee. The service updates the stock in the `stock` service when an order is completed. | ||
|
||
# Running the demo | ||
|
||
You will need to have a NATS server running. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
module github.com/qjoly/coffee-shop/coffee-maker | ||
module github.com/qjoly/autocoffee/coffee-maker | ||
|
||
go 1.22.5 | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
version: '3.8' | ||
services: | ||
routes: | ||
image: ghcr.io/une-tasse-de-cafe/coffee-shop/controller:latest | ||
image: ghcr.io/une-tasse-de-cafe/autocoffee/controller:latest | ||
build: . | ||
environment: | ||
- "NATS_URL=192.168.128.51:4222" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
version: '3.8' | ||
services: | ||
routes: | ||
image: ghcr.io/une-tasse-de-cafe/coffee-shop/routes:latest | ||
image: ghcr.io/une-tasse-de-cafe/autocoffee/routes:latest | ||
build: . | ||
ports: | ||
- 8080:8080 |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.