-
Notifications
You must be signed in to change notification settings - Fork 5
CoRE Stack Backend Installations
Ankit K. edited this page Mar 7, 2025
·
2 revisions
Branch: develop
- sudo apt-get update
- sudo apt-get install mysql-server
Start MySQL
- sudo service mysql start
Create a new database
- mysql -u root -p or sudo mysql (if no password is setup)
- create database nrm;
Create a new user
- mysql -u root -p
- CREATE USER 'nrm_user'@'localhost' IDENTIFIED BY 'xxxxxx';
- GRANT ALL PRIVILEGES ON nrm.* TO 'nrm_user'@'localhost';
- FLUSH PRIVILEGES;
- chmod +x install.sh
- ./install.sh
*Provide a name of your virtual environment when prompted:
example: nrm
*Provide a path to your environment when prompted:
example: /home/user/virtualenvs/nrm
Let the script run and install all the dependencies.
After the successfull installation of all the packages, run the following commands to start the Django server:
- conda activate nrm (or whatever is the name of your virtual environment)
- python manage.py runserver
Make Migrations
- Make sure the environment is active. Otherwise, run
conda activate nrm - Run
python manage.py migrateFor any migration related queries, please send an email to contact@core-stack.org
Run the server
- Make sure the environment is active. Otherwise, run
conda activate nrm - Run
python manage.py runserver
Tip: To make local hits to your server, use
python manage.py runserver 0.0.0.0:8080
Running celery
If you are running some tasks, you need to run celery -A tasks worker -l info
example:
celery -A nrm_app worker -l info -Q nrm &nrm queue is running in this example.
- Use .env.example as a template to create .env file inside nrm_app/ directory
- Update the environment variables
- Add JSON files inside the data/ directory