Skip to content

A web-app to track items and their expiry date at home. Written in Django.

Notifications You must be signed in to change notification settings

lina-is-here/home_inventory

Repository files navigation

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

About

A web-app to track items and their expiry date at home. Written in Django.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published