/docker-nginx-flask-gunicorn-skeleton

A Docker Compose Skeleton with Nginx, Flask-restplus, Gunicorn

Primary LanguageHTMLApache License 2.0Apache-2.0

docker-nginx-flask-gunicorn-skeleton

Build Status


Make sure you have docker and docker-compose installed beforehand


INSTALL


1. Set docker image for running app

pull default images

$ make pull_image

make 'requirements.txt' file in the same path with Dockerfile (we use './docker-image' in here) and then build an image for your server.

$ make build_image name={image_name} tag={image_tag}

2. Fix docker-compose.yml file

fix a image-name in the 'docker-compose.yml' file with the image that you made before.

in docker-compose.yml:

services:
    app1:
        ...
        image: {image_name}: {image_tag}
        ...

TEST

  • Don't need to run 'pull_image' and 'build_image' above.
    It will make temp docker image for testing and remove temp image after testing
$ make test_all
  • Should make own images with 'pull_image' and 'build_image' before running this command.
$ make test_app

RUN

  • Should make own images with 'pull_image' and 'build_image' before running this.
$ make run

USAGE

1. flask app

2. docker


3. nginx