rxmxn / pycoin

0 stars 0 forks source link

Docker image #29

Open rxmxn opened 4 years ago

rxmxn commented 4 years ago

Create docker image to run the app and put it in the raspi and leave it running. This image needs to communicate with the MongoDB database running in the server to be able to fetch and update the tables.

rxmxn commented 4 years ago

Installing docker: https://docs.docker.com/get-started/

Creating a good docker file for a Python app: https://www.docker.com/blog/containerized-python-development-part-1/

Another Examples of dockerizing Python apps: https://stackabuse.com/dockerizing-python-applications/ https://hasura.io/blog/how-to-write-dockerfiles-for-python-web-apps-6d173842ae1d/

rxmxn commented 4 years ago

https://stackoverflow.com/questions/24941791/starting-flask-server-in-background#24942027

https://flask.palletsprojects.com/en/1.1.x/deploying/

https://flask.palletsprojects.com/en/1.1.x/deploying/uwsgi/#starting-your-app-with-uwsgi

rxmxn commented 4 years ago

Maybe by not specifying the host I can make access to it by the IP of the container it's running on I can use docker compouse to create all the images and make them communicate with each other I could also point the docker host to the raspi and run the docker commands from local.

https://docs.docker.com/compose/gettingstarted/ https://docs.docker.com/compose/production/#running-compose-on-a-single-server