Coder Social home page Coder Social logo

simple_covid_tracker_scanner's Introduction

Simple Covid Tracker with CAC scanner

Set Up

  1. git clone https://github.com/phansiri/simple_covid_tracker_scanner.git
  2. cd simple_covid_tracker_scanner
  3. Create .env in the covid_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
  1. Create .env.db in the covid_project directory with something like:
POSTGRES_DB=change_database_name
POSTGRES_USER=change_super_cool_user
POSTGRES_PASSWORD=change_super_secret_password
  1. go back to the root directory with the docker-compose file
  2. docker-compose up --build
  3. There might be an error that the database does not exist.
    1. If so, run docker-compose down -v then docker-compose up --build
    2. 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
  4. Open a browser and navigate to localhost:8000

Creating a .desktop file for execution (ONLY WORKS ON UBUNTU OS)

  1. Have the docker-compose run on start up through the Startup Application Preferences
  2. Create the file as example.desktop to launch the browser to the correct url Add the following
    [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
    
    Take note of the run_me.sh. You will have to create that file at the path you determined
  3. Create the path/to/run_me.sh. Inside it should look something like:
    #!/bin/bash
    firefox http://localhost:8000   
  4. ensure to make it executable with chmod +x run_me.sh
  5. Afterwards, make sure the example.desktop can be be launched by right clicking on it and select Allow Launching
  6. See the icon change.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.