Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
rdcm committed Nov 18, 2023
1 parent 5349d48 commit 3365d63
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ debug/
target/

*.profraw
*.crt
*.key
30 changes: 28 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,35 @@ Web api application prototype written in rust
## Structure

- `acl` - anti corruption layer implemented as kafka consumer
- `app` - application layer with endpoints
- `api` - application layer with endpoints
- `domain` - business logic contracts (queries/commands interfaces)
- `domain_impl` - implementation of buisiness logic contracts
- `infra` - infrastructure layer (dal)
- `host` - host process for application with composition root
- `integration-tests` - integration tests for application
- `integration-tests` - integration tests for application

## Dev environment

- `docker` v24.0.6
- `docker-compose` v2.23.0
- `kubernetes` v1.28.2
- `rustc` 1.72.1
- `cargo` 1.72.1

For deploing with helm `/etc/hosts` require `127.0.0.1 dev-wep-api.com` entry for access to application in browser.

## Up & Running

From src folder:
- `docker-compose up -d` - up dev environment
- `run.sh` - run api application for local debuging
- `build.sh` - build all workspaces
- `build_images.sh` - build `acl` and `api` dev images
- `docker-compose --profile dev-build up -d` - up `acl` and `api` dev images with compose
- `format.sh` - format code
- `analyze.sh` - static analysis
- `run_tests.sh` - build and run tests

From root folder:
- `generate_cert.sh` - generate self signed cert and create kubernetes secret
- `deploy_helm.sh` - deploy images to local kubernetes cluster
10 changes: 10 additions & 0 deletions generate_cert.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

openssl req \
-x509 -newkey rsa:4096 -sha256 -nodes \
-keyout tls.key -out tls.crt \
-subj "/CN=ingress.local" -days 365

kubectl create secret tls api-secret \
--cert=tls.crt \
--key=tls.key
2 changes: 1 addition & 1 deletion helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ api:
memory: "128Mi"
cpu: "500m"
ingress:
host: foomyapp.com
host: dev-wep-api.com
ingressClassName: nginx
kafka:
brokers: kafka-service:9092
Expand Down

0 comments on commit 3365d63

Please sign in to comment.