A software developer from Bucharest, Romania
๐ซ You can message me on LinkedIn
๐ซ You can endorse my work by buying me a cofee :)
Uses docker compose with a python flask microservice and MongoDB instance to make a sample application
License: GNU General Public License v3.0
Just returns a random number without storing
Api that receives a photo resisez it and store it to the disk
Later one can get the thumbnail back
I followed the instructions to start the micorservice and got the following error
~ docker-compose --version
docker-compose version 1.28.4, build cabd5cfb
~ docker --version
Docker version 20.10.2, build 2291f61
~ docker-compose build
WARNING: Some services (krakend) use the 'configs' key, which will be ignored. Compose does not support 'configs' configuration - use `docker stack deploy` to deploy to a swarm.
ERROR: Invalid restart policy "always"
I did some search in the internet for similar issues and found this
and made some changes to docker-compose.yml
but I am not sure if this right way to do this.
krakend:
image: devopsfaith/krakend
volumes:
- - ./:/etc/krakend/
- configs:
- - krakend_config
+ - ./kraken.json:/etc/krakend
ports:
- "8080:8080"
Also I have the changed deploy.restart_policy
to on-failiure
since always
option is not available. After making these changes I am able to locally start all the services.
Let me know if there is any further iteration on the above solution to raise a PR.
Website: https://locust.io/
Find a way to integrate stress testing, and show results
Add get all users with pagination
web-book-collection_1 | pymongo.errors.NotMasterError: not master
Currently transactions won't work with standalone instances.
Issue: https://stackoverflow.com/questions/56336101/mongo-db-difference-between-standalone-1-node-replica-set
maybe tic-tac-toe or cards
I have written a small script to check for open ports. Let me know if I can create a PR for this
#!/bin/bash
arr=("$@")
for i in "${arr[@]}";
do
echo "$i"
done
isopenport()
{
arr=("$@")
for i in "${arr[@]}";
do
nc -z 127.0.0.1 $i &> /dev/null
result1=$?
if [ "$result1" != 0 ]; then
echo port $i is free
else
echo port $i is used
fi
done
}
ports=(80 81 82 83 84 85 86 88 1883 27017 8080 3000)
isopenport "${ports[@]}"
test if all works ok
Implement something with locations
If it's faster under load, create a separate Dockerfile and a new docker-compose service image with the pypy version of random demo
use Apache bench for load testing:
ab -n 3000 -c 10 http://localhost:800/random?lower=10&upper=100
An automated scripts when docker compose runs at build to populate some demo data
Error : Division by 0
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.