Website developed to support university days events where participants can register in events and consult their punctuation in those.
-
To run the project locally, open a command console and run the following commands:
pip install pipenv pipenv shell git clone https://github.com/innosoft-innoweb/innosoft-innoweb-1 cd innosoft-innoweb-1 pip install -r requirements.txt
-
This project uses environment variables that need to be set before running the project, you will need to create a file called ".env" inside the directory with the following content:
DJANGO_SECRET_KEY = 'django-insecure-_$s8&xy9@woe3wlr(pqj3r(n8q78o4j##h-f4e%@3=ms_d$!i7' PRODUCTION_DB_USER = ' ' PRODUCTION_DB_PASSWORD = ' '
An example django secret key is given here, but the best option is to have it generated by the user himself, knowing that it is a key that is used to encrypt sensitive data in the django application, and is at least 50 characters long.
-
To configure the database, it is necessary to indicate during the installation that the Setup type is full, and that the port to connect to the server will be 3307. Once the installation is finished, we must create the database and the user that will use our project, executing the following commands line by line in a script:
CREATE DATABASE innowebdb; CREATE USER 'innosoft'@'localhost' IDENTIFIED BY 'innosoft-2022'; GRANT ALL PRIVILEGES ON `innowebdb` . * TO 'innosoft'@'localhost'; FLUSH PRIVILEGES;
-
Now we will proceed to run the project, executing the following commands in a console inside the directory:
python manage.py makemigrations python manage.py migrate python manage.py loaddata "fixtures/initial.json" python manage.py runserver
-
If you've gotten to this point without any errors, you should be running the project locally successfully. You can access the initial route through the following link: http://localhost:8000
-
To run the docker container locally, open a command console and run the following commands:
git clone https://github.com/innosoft-innoweb/innosoft-innoweb-1 cd innosoft-innoweb-1
-
This project uses environment variables that need to be set before running the project, you will need to create a file called ".env" inside the directory with the following content:
DJANGO_SECRET_KEY = 'django-insecure-_$s8&xy9@woe3wlr(pqj3r(n8q78o4j##h-f4e%@3=ms_d$!i7' PRODUCTION_DB_USER = ' ' PRODUCTION_DB_PASSWORD = ' '
An example django secret key is given here, but the best option is to have it generated by the user himself, knowing that it is a key that is used to encrypt sensitive data in the django application, and is at least 50 characters long.
-
Once the .env file is created, run the following command in the project directory:
docker-compose up -d
-
Finally, open the browser and access the following link: http://localhost:8000
-
To run the development environment with Vagrant, open a command console and run the following commands:
git clone https://github.com/innosoft-innoweb/innosoft-innoweb-1 cd innosoft-innoweb-1 cd Vagrant vagrant up vagrant ssh
-
Once inside the virtual machine, execute in the command line:
cd innosoft-innoweb-1 sudo python3 manage.py makemigrations --settings=innoweb.deployment_settings sudo python3 manage.py migrate --settings=innoweb.deployment_settings sudo python3 manage.py loaddata "fixtures/initial.json" --settings=innoweb.deployment_settings sudo python3 manage.py runserver 0.0.0.0:8000 --settings=innoweb.deployment_settings
Django secret key is given in deployment_settings, but the best option is to have it generated by the user himself, knowing that it is a key that is used to encrypt sensitive data in the django application, and is at least 50 characters long.
-
Finally, open the host browser and access the following link: http://localhost:8000
In addition to all of the above, the project is deployed in PythonAnywhere in the following link.