git clone https://github.com/phansiri/simple_covid_tracker_scanner.git
cd simple_covid_tracker_scanner
- Create
.env
in thecovid_project
directory with something like:
DJ_SECRET_KEY=super-secret-key
DJ_ALLOWED_HOSTS=localhost 127.0.0.1 [::1] 0.0.0.0
DJ_DEBUG=True
SQL_ENGINE=django.db.backends.postgresql
SQL_DATABASE=change_database_name
SQL_USER=change_super_cool_user
SQL_PASSWORD=change_super_secret_password
SQL_HOST=db
SQL_PORT=5432
- Create
.env.db
in thecovid_project
directory with something like:
POSTGRES_DB=change_database_name
POSTGRES_USER=change_super_cool_user
POSTGRES_PASSWORD=change_super_secret_password
- go back to the root directory with the
docker-compose
file docker-compose up --build
- There might be an error that the database does not exist.
- If so, run
docker-compose down -v
thendocker-compose up --build
- Afterwards, in a different terminal at the same directory, you might need to apply the tables to the database with
docker-compose exec web python manage.py migrate
- If so, run
- Open a browser and navigate to localhost:8000
- Have the docker-compose run on start up through the
Startup Application Preferences
- Create the file as
example.desktop
to launch the browser to the correct url Add the followingTake note of the[Desktop Entry] Name=Example Name Comment=Launch browser to running application Exec=sh -c "path/to/run_me.sh" Icon=/path/to/cool/icon.svg Terminal=false Type=Application Version=1.0
run_me.sh
. You will have to create that file at the path you determined - Create the
path/to/run_me.sh
. Inside it should look something like:#!/bin/bash firefox http://localhost:8000
- ensure to make it executable with
chmod +x run_me.sh
- Afterwards, make sure the example.desktop can be be launched by right clicking on it and select
Allow Launching
- See the icon change.