Git Product home page Git Product logo

check_in_check_out_bks's Introduction

Simple Check In Check Out System

Marine Corps barracks still uses paper logbooks to check in / out Marines who want to go on liberty on or off base. This is a simple docker django application that works with a scanner that reads in a military Common Access Card and helps automate the process of checking in and out without the need of the Marine on duty to fill out a single physical logbook. This is meant to run on a local machine.

Splash Page

Future features

  • Use Data Science Pandas for simple metrics evaluation for Reports tab
  • Connect to Github Actions
  • Convert to backend (Django API) and frontend (React) Single Page Application

Getting Started

docker-compose up --build These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

  1. Docker: Get Docker
  2. Python: Get Python

Installing

  1. Install Docker and Python
  2. Download this repository
git clone https://github.com/phansiri/check_in_check_out_bks.git
  1. Create an .env file inside the cico_project directory that contains the below example:
DJ_DEBUG=True
DJ_SECRET_KEY=super_secret_key
DJ_ALLOWED_HOSTS=localhost 127.0.0.1 [::1] 0.0.0.0
SQL_ENGINE=django.db.backends.postgresql
SQL_DATABASE=cat_database_name
SQL_USER=super_cool_user
SQL_PASSWORD=super_secret_password
SQL_HOST=db
SQL_PORT=5432
  1. Create an .env.db file inside the cico_project for the environment variables to create the database inside the postgres image.
POSTGRES_DB=cat_database_name
POSTGRES_USER=super_cool_user
POSTGRES_PASSWORD=super_secret_password
  1. Ensure the information for the databases are the same between the .env and .env.db

  2. In the root of the repo on the command line, type docker-compose up --build

  3. You will notice that your database will probably not exist

    1. Run: docker-compose down -v This will removed the persistent stored volume
    2. Run docker-compose up --build and it ought to apply.
    3. In a different terminal, run to ensure models are in the database:
    4. docker-compose exec web python manage.py migrate
      • If it asks you to make migrations first, run:
        • docker-compose exec web python manage.py makemigrations
  4. Open http://localhost:8000 A step by step series of examples that tell you how to get a development env running

Running the tests

  1. To run tests, ensure the docker-compose is up with
    • docker-compose up
  2. After it is up and running, open another terminal and run:
    • docker-compose exec web python manage.py test
  3. In order to see the admin backend, a super user must be created by running:
    • docker-compose exec web python manage.py createsuperuser

Built With

  • Bootstrap - Front-end open source toolkit
  • Django - High-level Python Web framework
  • Docker - Containerization

Acknowledgments

Useful commands or recommendations

  • docker-compose exec web python manage.py startapp cico_app
  • docker-compose exec web python manage.py test --parallel
  • docker-compose exec web python manage.py createsuperuser
  • docker-compose exec web python manage.py makemigrations
  • docker-compose exec web python manage.py migrate
  • docker-compose exec web python manage.py check --deploy
  • docker-compose up --build
  • docker-compose down
  • Entrypoint.sh must be executable: chmod +x entrypoint.sh

check_in_check_out_bks's People

Contributors

phansiri avatar lit-dds avatar

Watchers

James Cloos avatar  avatar  avatar

check_in_check_out_bks's Issues

Web_1 container

I can get all the way to the last step then get this error

ERROR: No container found for web_1

when I try to run this in the in CMD:

docker-compose exec web python manage.py migrate

When I check the containers in Docker, the db container is good but the web_1 container gives me this error:

web_1 | standard_init_linux.go:219: exec user process caused: no such file or directory
check_in_check_out_bks_web_1 exited with code 1

I verified the .env and .end.db have matching info and followed all your steps exactly, even starting over and still get the same error.

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.