On Pycharm: Get from VCS > Follow menu to clone project (might need to add your github account if not done before)
After project cloned into Pycharm
copy .env.prod to .env and set the variables related to mysql
- DEBUG=1
- DATABASE=mysql
- MYSQL_ROOT_PASSWORD=rootpassword
- MYSQL_DATABASE=novadb
- MYSQL_USER=novauser
- MYSQL_PASSWORD=novapassword
- MYSQL_HOST=127.0.0.1
- MYSQL_PORT=3306
Launch DB, example with Docker:
cd <folder where the .env is located>
docker run --name nova-dev-mysql --env-file .env --network host -d mysql:5.7 --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
Allow Django to create DB, tables, ... :
export $(cat .env | xargs)
python manage.py migrate
python manage.py createsuperuser
Set in the .env file the OS_* with the info from creodias cloud dashboard > OpenStack RC File v3:
Remove from the .env all the empty variables
Add .env to PycharmConfiguration > Edit configurations
Login in http://127.0.0.1:8000/ with the credentials created for superuser