-
Notifications
You must be signed in to change notification settings - Fork 997
Installing and Running Bootcamp
Django version 1.11.x or up.
via HTTPS
git clone https://github.com/vitorfs/bootcamp.git
or via SSH
git clone [email protected]:vitorfs/bootcamp.git
At the project root there is a requirements folder which contains three .txt
files.
For development, install the file named local.txt
:
pip install -U -r requirements/local.txt
For deployment, install the file named production.txt
:
pip install -U -r requirements/production.txt
Note: If you are having problems with Pillow installation please take a look at the detailed installation guide in the documentation
The project has been conceived to work with PostgreSQL, which you can obtain from their home page.
As the project uses django-environ you will need to create a file named .env at the root of the project with at least the three following values:
DEBUG=True
SECRET_KEY=mys3cr3tk3y
DATABASE_URL=postgres://u_bootcamp:p4ssw0rd@localhost:5432/bootcamp
Note: You can use Django methods to create a new SECRET_KEY
Note 2: To use sqlite on a development environment, you can change the DATABASE_URL
to something like
sqlite:////path/to/root/folder/random_name.sqlite3
Note 3: For additional help, we added to the repository the file .env.example
which contains a list of variable values to be elevated to environmental values, and then, you can use it as a template to create the .env
file required by the project.
Bootcamp implements the package django-channels, which requires a proper backend as a channel layer, you can download the version of your choice (v3.x minimum) at their home page; once deployed, remember to configure properly the variable REDIS_URL
to your .env
file, as provided in the env.example
file.
After connecting the database, remember to apply the project migrations.
python manage.py migrate
python manage.py runserver
To deploy Bootcamp in production, you need to keep in mind your desired setup for django projects; the only special requirement this platform has is the Redis backend and the recommendation to run on PostgreSQL, beside that, you can use your own ASGI compliant server to allow the django-channels websockets connections to work as intended, also the proxy server you want to use.
- For better understanding of how to setup your local environment, please read this considerations
- If you use Docker in your development workflow, please refer to this considerations