Telenurse is a logistic project for providing healthcare and nursing. It will be very useful to have an integrated system so that both job seekers and people who need nursing and medical services at home can use it and communicate easily with each other. In order to ensure the users of this system, this system should be implemented in such a way that the supervisors and managers in the support center are always aware of the status of all nurses and if there is a problem, they will deal with it as soon as possible.
- Saba Hashemi
- Amirmahdi Namjoo
- Sepehr Safari
- Alireza Tajmirriahi
Note: The MVP phase of the project was done by a separate team (Mahsa Amani, Tarlan Bahadori, Dorna Dehghani, and Bahar Khodabakhshian). Some commits of the MVP phase are still present, but most of them are squashed together into one.
First, you need to have Docker installed. Then follow steps below:
- Build your docker image using:
$ make build
- Generate the SQL commands for preinstalled apps using:
$ make makemigrations
- Execute those SQL commands in the database file using:
$ make migrate
- Create you admin with full access using:
$ make superuser
- Run your server using:
$ make runserver
- Finally, open your browser and go to address below to see the project on your localhost.
- Other commands are available in Makefile.
- In case of any errors in building images, turn on your VPN.
To test your code based on test.py files which include the tests you have written, run below command:
$ make tests
- If you want to run
manage.py
commands locally and connect to postgis running on docker, add following line to/etc/hosts
:
127.0.0.1 postgres-db
- Only run postgres service:
docker-compose up --build -d postgres-db
The database can be backed up automatically every 12 hours using pgbackups
service defined in docker compose.
Check image's github page for more info about configuration.
Restore example:
Run the following command to make a new postgres container:
docker run --rm -it --name restored-db -v $PWD/postgres_backups/daily/telenurse-20220103-143546.sql.gz:/tmp/backupfile.sql.gz kartoza/postgis:12.1
Get into the container's shell:
docker exec -it restored-db /bin/sh
Run the following command on the container:
zcat /tmp/backupfile.sql.gz | PGPASSWORD=docker psql --host=127.0.0.1 --port=5432 --username=docker --dbname=postgres