Skip to content

mehemken/docker-flask-postgres

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docker-flask-postgres

This is a simple demo for how to connect to a Postgres database from a python flask application. To run this on your computer you must first install docker.

##Running

First do a git clone.

git clone https://github.com/mehemken/docker-flask-postgres

Then make sure you have docker installed. I also recommend docker-compose to make life easier, but it comes with docker engine for Windows and Mac.

Once you have all of that, you should be good. No need to install Postgres or even Python.

alias fig="docker-compose"

fig up --build -d   #Run the container

fig down   #Stop and remove everything

# Add your code to the /app/ directory
# At the moment, you have to do a fig up/down after each change.
# However, I'll be adding support for a dev setting
# where all you'll need is to refresh the page in your browser.

The site will be available to you at localhost:43434.

About

A flask container talks to a postgres container.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •