Giter Club home page Giter Club logo

home_inventory's Introduction

Home Inventory

Simple app to track items at home and use (eat) them before the expiry date.

Configuration

The app expects the following variables in the .env file in ./home_inventory directory. The variables are:

  • HI_SECRET_KEY – A secret key for a particular Django installation. This is used to provide cryptographic signing, and should be set to a unique, unpredictable value. See more in the Django docs. One of the possible ways to generate it is by running $python3 -c 'import secrets; print(secrets.token_hex(100))'.
  • POSTGRES_DB – name of the database.
  • POSTGRES_USER – user with superuser power in PostgreSQL.
  • POSTGRES_PASSWORD – superuser password for PostgreSQL. More on the POSTRGRES_ variables.

See home_inventory/.env_example for the example.

Certificates

Docker-compose expects certificates in order to run the app using HTTPS. This is required for the barcode reading feature to work on mobile devices.

From the root of the project:

# create the directory for certificates
$ mkdir certs
$ cd certs

# create certificates
$ openssl req \
       -newkey rsa:2048 -nodes -keyout domain.key \
       -x509 -days 365 -out domain.crt

Running

$ docker-compose up

In case of changes, run $ docker-compose up --build to rebuild the images.

Integration Tests

Integration tests are located in /integration_tests.

To run them:

$ docker-compose -f docker-compose-integration-tests.yml up --build --abort-on-container-exit

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.