daddydrac / vuejs-flask-docker

Test driven docker solution using VueJS, Flask REST Plus, PostgresSQL, with swagger, prebuilt authentication+JWT's running on NGINX/https using material ui design

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Flask REST Plus, VueJS, and automated unit testing via Flask CLI

Test driven docker solution using VueJS, Flask, PostgresSQL, with swagger, & prebuilt authentication+JWT's running on NGINX/https

1. Getting Started

docker-compose up -d --build

2. Seed Postgres DB with Flask CLI

docker-compose exec backend python manage.py create

docker-compose exec backend python manage.py seed

The default login creds that seed the db are:

User: avengers@gmail.com

Pass: supersecret

3. The VueJS UI will be on:

https://localhost:4433/

4. The backend API routes will be on:

https://localhost:4433/<api route>

5. Then see the json returned from the users API route here:

http://localhost:5001/users

6. Run automated unit tests

docker-compose exec backend pytest "project/tests" -p no:warnings --cov="project"

7. Swagger URL

http://localhost:5001/swagger


In case you need to regenerate SSL keys

Open the command line and run these commands inside the services/nginx/ssl folder to generate a self signed certificate:

openssl req -new -newkey rsa:1024 -x509 -sha512 -days 365 -nodes -out nginx.crt -keyout nginx.key

openssl dhparam -out dhparam.pem 1024


About

Test driven docker solution using VueJS, Flask REST Plus, PostgresSQL, with swagger, prebuilt authentication+JWT's running on NGINX/https using material ui design

License:MIT License


Languages

Language:Python 64.1%Language:Vue 23.9%Language:JavaScript 8.2%Language:Dockerfile 1.7%Language:HTML 1.1%Language:Mako 0.7%Language:Shell 0.2%