docker network create flask-net
https://hub.docker.com/_/postgres
docker run -d \
-e POSTGRES_PASSWORD=mysecretpassword \
--net flask-net \
--name flask-postgres \
-v /my/own/datadir:/var/lib/postgresql/data \
postgres
https://github.com/Azure-Samples/flask-postgresql-app
docker build -t my-flask .
docker run -it -p 5000:5000 \
-e DBHOST=flask-postgres \
-e DBPASS=mysecretpassword \
-e DBUSER=postgres \
-e DBNAME=postgres \
--net flask-net \
--name flask-app \
my-flask