https://github.com/kmadsdev/devops-challenge
PicPay Jr Devops Challenge Solution
https://github.com/kmadsdev/devops-challenge
api cors devops docker go html-css javascript microservices python redis sre
Last synced: 2 months ago
JSON representation
PicPay Jr Devops Challenge Solution
- Host: GitHub
- URL: https://github.com/kmadsdev/devops-challenge
- Owner: kmadsdev
- Created: 2025-12-05T20:57:19.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-12-30T00:17:32.000Z (3 months ago)
- Last Synced: 2026-01-02T07:41:32.681Z (3 months ago)
- Topics: api, cors, devops, docker, go, html-css, javascript, microservices, python, redis, sre
- Language: JavaScript
- Homepage:
- Size: 27.3 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# DevOps Challenge
My solution for a technical challange made for upcoming Jr DevOps/SRE Engineers at the green bank💚
## How to Run
```bash
docker compose build
docker compose up --build
```
> The web page will be hosted at [https://localhost:5000/](https://localhost:5000/)
## Test on terminal
### Test the API health
```bash
curl.exe http://localhost:8082/health
```
> Should return **`up`**
### Writer
```bash
Invoke-WebRequest -Method POST -Uri http://localhost:8083/write -Body "hello"
```
### Reader
```bash
Invoke-WebRequest http://localhost:8082/data
```
# Architecture
### Stack
- Frontend: HTML/CSS, Bootstrap, JavaScript, Node.JS
- Backend: Python, GO
- Database: Redis
### Containers
The `docker-compose.yaml` will create & orchestrate 4 containers:
- `devops-challenge-web-1` - Web Service
- `devops-challenge-writer-1` - Writer Service
- `devops-challenge-reader-1` - Reader Service
- `devops-challenge-redis-1` - Redis Database
### Service Ports
- Web/Front: [http://localhost:5000/](http://localhost:5000)
- Reader: [http://localhost:8082/](http://localhost:8082)
- Writer: [http://localhost:8083/](http://localhost:8083)
- Redis: [http://localhost:6379/](http://localhost:6379)
### Flow
The user (using the `Web Service (Node.JS)`) can send or request data from the redis
- Send: `Writer Service (python)` writes on `Redis` and returns a code `201` to `Web Service (Node.JS)`
- Request: `Reader Service (GO)` reads from `Redis` and returns its data to `Web Service (Node.JS)`
### Architecture Design / Infra
