Project made with Django + PostgreSQL + qrcode
Install docker-ce and docker-compose from each documentation
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
Simply run the up
command of your choice and voilà.
Development up
make up
This command will start 2 services on your machine:
- Django server on http://0.0.0.0:8000
- PostgreSQL service on port 5432
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:
- Django server
- Django server (admin service) on http://0.0.0.0:8000
- PostgreSQL service
- Nginx service on http://0.0.0.0
IMPORTANT NOTE!
Only the nginx, and django admin services are binded to your machine ports
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
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')
.