Giter VIP home page Giter VIP logo

danionescu0 / docker-flask-mongodb-example Goto Github PK

View Code? Open in Web Editor NEW
95.0 95.0 40.0 13.27 MB

Uses docker compose with a python flask microservice and MongoDB instance to make a sample application

License: GNU General Public License v3.0

Python 87.00% Dockerfile 2.15% Shell 9.23% HTML 1.62%
baesian crud docker docker-compose flask fulltext-search geospatial grafana influxdb locusts microservice mongodb mosquitto mqtt photo-processor python python3 stress-testing swagger

docker-flask-mongodb-example's Introduction

Hi there ๐Ÿ‘‹ I'm Dan ๐Ÿ‘จโ€๐Ÿ’ป

A software developer from Bucharest, Romania

ย ย  ย ย  StackOverflow

๐Ÿ“ซ You can message me on LinkedIn

๐Ÿ“ซ You can endorse my work by buying me a cofee :)

docker-flask-mongodb-example's People

Contributors

danionescu0 avatar dependabot[bot] avatar neelabalan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-flask-mongodb-example's Issues

Photo processing demo

Api that receives a photo resisez it and store it to the disk
Later one can get the thumbnail back

getting error running `docker-compose build`

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.

check for open ports with script

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[@]}" 

Preloaded data

An automated scripts when docker compose runs at build to populate some demo data

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.