Skip to content

rodrigondec/qrcode

Repository files navigation

Qr Coder project

Project made with Django + PostgreSQL + qrcode

License

Install

Docker + docker-compose

Install docker-ce and docker-compose from each documentation

Setting up

to copy the file .env.example to .env, create the file .nginx/error.log and copy the file .nginx/nginx.conf.example to .nginx/nginx.conf run the following commands:

Linux
make config.env
make config.nginx.log
make config.nginx.conf

or

make config.all

The next step is to build project image

Development image
make build
Production image
make build.prod

Running the project

Simply run the up command of your choice and voilà.

Development up
make up

This command will start 2 services on your machine:

IMPORTANT NOTE!

These services are binded to each of your machine respective port

Production up
make up.prod

This command will start 3 services on your machine:

IMPORTANT NOTE!

Only the nginx, and django admin services are binded to your machine ports

Tests

On the project folder:

  • run the command $ make test or $ make test app=$(app_name). You may run the command $ make coverage instead.
  • run the command $ make flake8

Administration

Django Admin Site is enabled for the project on http://0.0.0.0:8000/admin or http://0.0.0.0/admin (depending on up command).

The command $ make populate.superuser may be used to create the superuser User(username='superuser', password='@Admin123').