Skip to content

Latest commit

 

History

History
52 lines (37 loc) · 3.46 KB

README.md

File metadata and controls

52 lines (37 loc) · 3.46 KB

spejstore (AKA inventory)

The general HSWAW (and other polish hackerspaces) inventory system.

Because there is not enough general inventory software invented here yet.

Usage

Quick start (VSCode)

  1. Copy .env.example as .env
  2. Have docker compose 2.0. You can identify it by having docker compose command instead of docker-compose.
  3. Customize your .env for your specific usecase.

VSCode

  1. Setup environment variables
  2. Get VSCode from here, CAN NOT be VSCodium, as the extension is a microsoft binary which does not work with VSCodium.
  3. Install Dev Containers extension
  4. Clone the repository and open it with VSCode.
  5. You should get a toast like this when re-opening directory with the cloned repository. Toast example
    1. If you don't get a toast, then use (CMD|Ctrl)+Shift+P to open actions menu and choose option Rebuild Without Cache and Reopen in Container. Command example
  6. Reopen the directory in container either via command or popup button.
  7. Wait for the application and container to properly build.
    1. Devcontainer's VSCode instance will be automatically configured with extensions to help your development process.
    2. You might get a Toast telling you to re-open the directory due to Black not working properly. Do so for proper autoformatting support.
    3. Make sure that extensions were installed in your vscode devcontainer. It might take a couple of minutes.
  8. manage.py migrate will be run automatically after container creation, to make sure you have the latest migrations done on the development database without any need for interaction.
  9. Run debug session with either command of "Start Debugging" (default hotkey F5), or with the Debug sidebar. Debug sidebar instructions
  10. You should have automatically forwarded ports, so the only thing remaining is opening browser window with the url provided in terminal.

Everything else (docker)

  1. Run docker compose up. This will create a production-ready setup with gunicorn. out of the box.

Everything else (python)

  1. Get python3
  2. pip install -r requirements.txt
  3. python3 manage.py migrate
  4. python3 manage.py collectstatic
  5. python3 manage.py runserver 0.0.0.0:8000

New docs (WIP)

Spejstore is a simple inventory system made for Warsaw Hackerspace purposes. Includes some features very specific to hswaw requirements, which are:

  • Label printing and label-system support (via django-rest-api api views and SPEJSTORE_LABEL_API env variable), using the spejstore-labelmaker software
  • Publically viewing all items and requiring users to sign in view oauth to manage inventory via django-admin
  • Authorizing label printing via local network only, see SPEJSTORE_LAN_ALLOWED_ADDRESS_SPACE env variable

Currently inventory is deployed under inventory.waw.hackerspace.pl, with a Beyondspace NGINX configuration, which allows the inventory to be accessible from outside of the Warsaw Hackerspace network with a necessary oauth authorization, but does not allow printing of labels without physically being in the local network of HSWAW.