Skip to content

Sample flask_restful app with Apache configs

License

Notifications You must be signed in to change notification settings

minelminel/flask-restful-wsgi

 
 

Repository files navigation

flask-restful-wsgi

Sample flask_restful app with Apache mod_wsgi configs

Purpose

This repo illustrates a simplified approach for deploying a flask_restful (Python Flask) app on Apache 2.4 using mod_wsgi. In general, this is a more specific elaboration to this guidance. Say you have a front-end that can be deployed as a static site (think React app) with the flask_restful application serving as the API layer for that front-end, this repo will help you with a basic Apache config for that: static site is at '/' and the api is at '/api'.

Usage

A Makefile has been provided which contains several common commands

$ make build    # create the image
$ make run      # start container on localhost:8000
$ make shell    # spawn an interactive shell inside container

Developing

Hot reload is enabled when using the docker-compose file, just save your files and reload the page without restarting

docker-compose up --build

About

Sample flask_restful app with Apache configs

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 45.6%
  • Dockerfile 33.8%
  • Shell 12.4%
  • Makefile 7.4%
  • HTML 0.8%