The IDC Web Application is currently under development
The system uses Vagrant to setup a consistent, platform independent development environment. To setup your development environment to run locally, you will need to install the following:
From there perform the following steps...
PycharmProjects
directory (the parent directory of your repositories) called secure_files/idc
.sample.env
file to a file named .env
in secure_files/idc
. The setup process requires this name and this path..env
file with the proper values
MYSQL_ROOT_PASSWORD
and DATABASE_PASSWORD
can be the same, and DATABASE_USER
can be root
GCLOUD_PROJECT_ID
, OAUTH2_CLIENT_SECRET
, OAUTH2_CLIENT_ID
, and the application credentials file will be obtained from one of the other developers as part of
an initial set of starter files.PyCharm Pro can be used to run your Web Application as a native Django application.
CMD+,
)/home/vagrant/www/shell/python-su.sh
and click Ok
/user/bin/python3.X
or similar.0.0.0.0
and the port to 8086
./home/vagrant/www
...
next to the Environment variables:
, box and add the following values:
SECURE_LOCAL_PATH = ../parentDir/secure_files/idc/
(you MUST have the trailing /
)PYTHONPATH = /home/vagrant/www:/home/vagrant/www/lib:/home/vagrant/www/IDC-Common
VM_PYTHONPATH = /home/vagrant/www:/home/vagrant/www/lib:/home/vagrant/www/IDC-Common
DJANGO_SETTINGS_MODULE = idc.settings
PYTHONUNBUFFERED = 1
You will need to set the shell/python-su.sh
file to be executable. You can do this via the vagrant machine's command line with the command chmod +x /home/vagrant/www/shell/python-su.sh
(This step is done for you by vagrant-set-env.sh
when the VM image is first built.)
To run your server in PyCharm:
To add Python Libraries or Dependencies, you should add them to the requirements.txt file and they will automatically be pulled down when a new developer starts the system.
To update your existing python dependencies because of a change, or to pull down additional libraries you need, SSH into the virtual machine and run pip3 install
. Through PyCharm, you can take the following steps:
cd www; sudo pip3 install -r requirements.txt --upgrade -t lib/
Or from the command line, you can do this by doing the following:
vagrant ssh
to login to the virtual machinewww
directory (/home/vagrant/www/
is the full path)pip3 install -r requirements.txt --upgrade -t lib/