The goal of your app.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
Things you need to have installed:
- pipenv
- Docker
or
- pipenv
- Python3
- PostgreSQL
This is a quick project setup for local machine and development purpose to get server up at http://0.0.0.0:8000/
.
-
Clone this repo.
$ git clone [email protected]:diogosimao/django-docker-boilerplate.git your-app
-
Create a virtual environment. Make sure you have pipenv installed.
$ cd your-app $ pipenv --three && pipenv shell
It will need some extras. See requirements_docker.txt
$ pip install -r requirements_docker.txt
$ . ./bin/start-docker-development-server.sh
-
Create database on PostgreSQL
$ createdb your-app
-
With a shortcut just edit
./bin/start-development-server.sh
with your DB system info and run the shell script. -
Or without the
script
follow ahead with:$ pip install -r requirements.txt
-
Set
DATABASE_URL
environment variable:$ export DATABASE_URL=pgsql://YOUR_USER:[email protected]:5432/your-app
-
Run Django
makemigration
andmigrate
:$ python manage.py makemigrations $ python manage.py migrate
-
Run the development server
$ python manage.py runserver
-
-
Create
superuser
with the following line:$ python manage.py createsuperuser
Default Django administration screen should be up at http://0.0.0.0:8000/admin
and you are able to login in.
From your-app
directory with pipenv --three
and pipenv shell
previously executed:
$ pip install -r requirements.txt
To run the unittests for this system locally:
$ python manage.py test
In case you want to see code coverage the htmlcov
folder (which contains html output from coverage
package) will be created after running:
$ . ./bin/run-tests.sh
Do you have geckodrive
install for Firefox
? If not see jq.
After than install it with:
$ . ./bin/geckodrive-install.sh
and
$ python tests/functional/tests.py
- Django 2.0 - The web framework used
- Bootstrap4 - An open source toolkit for developing with HTML, CSS, and JS.
- font-awesome
- Via django-icons
- and <3
- Diogo Simão
- My folks