# Build an image named "inventory" with:
#   docker compose build
#
# Start service "inventory-inventory-1" from the image:
#   docker compose up
#
# If you want to run the service in the background, add "-d":
#   docker compose up -d
#
# Please note that the file "inventory.db" must exist, and be
# writable for the user in the image (uid 1000, gid 1000, you
# can change that below).
#
# Please also note that setting INVENTORY_DISABLE_AUTH to 1
# (like shown above) disables authentication and thus shall
# NEVER be used in untrusted networks (like the internet)!
#
# For more documentation and development, please see:
#   https://github.com/chiefenne/electronics_inventory
#
---
name: inventory
services:
  inventory:
    image: inventory
    build: .
    volumes:
      - type: bind
        source: inventory.db
        target: /prog/inventory.db
    ports:
      - 8081:8081
    environment:
      ENV INVENTORY_DISABLE_AUTH: 1
      # ENV INVENTORY_USER: andreas"
      # ENV INVENTORY_PASS_HASH: '$pbkdf2-sha256$...$...$...'
      # ENV INVENTORY_BASE_URL: http://127.0.0.1:8001
