Skip to content

Commit ca792b5

Browse files
committed
ci: add repository visualization github action job
1 parent 6af0dbe commit ca792b5

File tree

2 files changed

+47
-22
lines changed

2 files changed

+47
-22
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: Create diagram
2+
on:
3+
workflow_dispatch: {}
4+
jobs:
5+
get_data:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- name: Checkout code
9+
uses: actions/checkout@main
10+
- name: Update diagram
11+
uses: githubocto/repo-visualizer@main

README.md

Lines changed: 36 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ This repository contains solutions to two distinct tasks:
44

55
1. A Python Flask API deploying to Production Environment
66
2. Secure Database Access from the API
7+
8+
The codebase can be better visualized as below:
9+
10+
![Visualization of the codebase](./diagram.svg)
711

812
# Table of Content
913

@@ -77,27 +81,37 @@ All the tools we have used so far are Free to use for personal usage.
7781
The above command uses docker compose to run containerized instance of our API and `postgres-13.5` database and then uploads the mock data into the postgres database.
7882

7983
3. Test the application by making API requests. For example:
80-
```bash
81-
curl "http://127.0.0.1:3000/rates?date_from=2021-01-01&date_to=2021-01-31&orig_code=CNGGZ&dest_code=EETLL"
82-
```
83-
The output should be something like this:
84-
```json
85-
{
86-
"rates" : [
87-
{
88-
"count" : 3,
89-
"day" : "2021-01-31",
90-
"price" : 1154.33333333333
91-
},
92-
{
93-
"count" : 3,
94-
"day" : "2021-01-30",
95-
"price" : 1154.33333333333
96-
},
97-
...
98-
]
99-
}
100-
```
84+
- GET - Greeting API (Health check)
85+
```bash
86+
curl http://127.0.0.1:3000
87+
```
88+
89+
```json
90+
{"message":"Hello world!"}
91+
```
92+
- GET - Rates API
93+
```bash
94+
curl "http://127.0.0.1:3000/rates?date_from=2021-01-01&date_to=2021-01-31&orig_code=CNGGZ&dest_code=EETLL"
95+
```
96+
97+
The output should be something like this:
98+
```json
99+
{
100+
"rates" : [
101+
{
102+
"count" : 3,
103+
"day" : "2021-01-31",
104+
"price" : 1154.33333333333
105+
},
106+
{
107+
"count" : 3,
108+
"day" : "2021-01-30",
109+
"price" : 1154.33333333333
110+
},
111+
...
112+
]
113+
}
114+
```
101115
4. Stop the application
102116
```bash
103117
make stop-app-db
@@ -275,7 +289,7 @@ The application infrastructure primarily contains the Terraform code for deployi
275289
276290
Override the default values set in the `variables.tf` for each environment in the `[ENVIRONMENT_NAME]/terraform.tfvars` file respectively as shown below:
277291
278-
```json
292+
```terraform
279293
app_container_config={
280294
name = "[ENVIRONMENT_NAME]-python-postgres-azure-app"
281295
revision_mode = "Single"

0 commit comments

Comments
 (0)