Skip to content

Latest commit

 

History

History
52 lines (34 loc) · 1.11 KB

File metadata and controls

52 lines (34 loc) · 1.11 KB

Docker Setup

Use this guide if you want to use Docker in your project.

Built with Docker v19.03.5.

Getting Started

Update the environment variables in docker-compose.yml, and then build the images and spin up the containers:

$ docker-compose up -d --build

By default the app is set to use the production configuration. If you would like to use the development configuration, you can alter the APP_SETTINGS environment variable:

APP_SETTINGS=project.server.config.DevelopmentConfig

Create the database:

$ docker-compose run web python manage.py create-db
$ docker-compose run web python manage.py db init
$ docker-compose run web python manage.py db migrate
$ docker-compose run web python manage.py create-admin
$ docker-compose run web python manage.py create-data

Access the application at the address http://localhost:5002/

Testing

Test without coverage:

$ docker-compose run web python manage.py test

Test with coverage:

$ docker-compose run web python manage.py cov

Lint:

$ docker-compose run web flake8 project