Skip to content

MarkusWb/pandas-flask-sqlalchemy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

pandas-flask-sqlalchemy

Docker base image for Flask apps

The image is available as markuswb/pandas-flask-sqlalchemy on Docker Hub

Usage

Base image for Flask webapps/APIs with support for login with JWT, SQLAlchemy database connection, numpy and pandas pre-installed. waitress ist provided as production server.

Derive your image with a Dockerfile similar to

FROM markuswb/pandas-flask-sqlalchemy

EXPOSE 5000

ENV FLASK_APP myapp.py
ENV FLASK_CONFIG docker

COPY app app
COPY myapp.py config.py boot.sh ./
USER application
CMD ["./boot.sh"]

The start script boot.sh should contain the lines

#!/bin/sh
source venv/bin/activate
exec waitress-serve --port=5000 myapp:app

to activate the virtual environment and start the web server. For database initialization a deployment script might be necessary.

About

Docker base image for Flask apps

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published