Update README.md
This commit is contained in:
60
README.md
60
README.md
@@ -2,54 +2,46 @@
|
|||||||
|
|
||||||
_Keep track of your inventory of 3D-printer filament spools._
|
_Keep track of your inventory of 3D-printer filament spools._
|
||||||
|
|
||||||
Spoolman is a python-based web service that helps you keep track of your filament spools and how they are being used.
|
Spoolman is a web service that helps you keep track of your filament spools and how they are being used.
|
||||||
|
|
||||||
It is designed to be easily integrated into printer software such as Octoprint and Moonraker where
|
It is designed to be easily integrated into printer software such as Octoprint and Moonraker where
|
||||||
these services can e.g. list available spools, report filament consumption, etc.
|
these services can e.g. list available spools, report filament consumption, etc.
|
||||||
|
|
||||||
Currently, it has no client GUI, and only operates using HTTP REST commands.
|
It exposes a REST API which backends can interact with. See the [OpenAPI description](https://donkie.github.io/Spoolman/) for more information.
|
||||||
|
|
||||||
REST API: https://donkie.github.io/Spoolman/
|
It also ships with a simple web-based UI that lets you manipulate the stored data, add filaments, etc.
|
||||||
|
|
||||||
## Prerequisites
|
## Installation
|
||||||
|
|
||||||
The data can be stored using any async SQLAlchemy supported database:
|
### Using Docker
|
||||||
|
|
||||||
- External databases: PostgreSQL, MySQL, MariaDB, CockroachDB
|
The data can be stored in any of the following databases: SQLite, PostgreSQL, MySQL, MariaDB, CockroachDB.
|
||||||
- Internal database: SQLite
|
By default, SQLite is used which is a simple no-install database solution that saves to a single .db file located in the server's user directory.
|
||||||
|
|
||||||
If none of the below SPOOLMAN_DB_* environment variables are set, a SQLite database located in the user directory will be created and used.
|
The easiest way to run Spoolman is using Docker. Here is a sample docker-compose.yml to get you started:
|
||||||
|
```yaml
|
||||||
|
version: '3.8'
|
||||||
|
services:
|
||||||
|
spoolman:
|
||||||
|
image: ghcr.io/donkie/spoolman:latest
|
||||||
|
restart: unless-stopped
|
||||||
|
volumes:
|
||||||
|
- ./data:/home/app/.local/share/spoolman
|
||||||
|
ports:
|
||||||
|
- "7912:8000"
|
||||||
|
```
|
||||||
|
|
||||||
|
Once you have it up and running, you can access the web UI by browsing to `http://your.ip:7912`.
|
||||||
|
|
||||||
|
If you want to connect with an external database instead, specify the environment variables from the table below.
|
||||||
|
|
||||||
Database configuration:
|
|
||||||
| Variable | Description |
|
| Variable | Description |
|
||||||
|---------------------------|------------------------------------------------------------------------------------------------------------------------------|
|
| ------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| SPOOLMAN_DB_TYPE | Type of database, any of: "postgres", "mysql", "sqlite", "cockroachdb" |
|
| SPOOLMAN_DB_TYPE | Type of database, any of: `postgres`, `mysql`, `sqlite`, `cockroachdb` |
|
||||||
| SPOOLMAN_DB_HOST | Database hostname |
|
| SPOOLMAN_DB_HOST | Database hostname |
|
||||||
| SPOOLMAN_DB_PORT | Database port |
|
| SPOOLMAN_DB_PORT | Database port |
|
||||||
| SPOOLMAN_DB_NAME | Database name |
|
| SPOOLMAN_DB_NAME | Database name |
|
||||||
| SPOOLMAN_DB_USERNAME | Database username |
|
| SPOOLMAN_DB_USERNAME | Database username |
|
||||||
| SPOOLMAN_DB_PASSWORD_FILE | Path of file which contains the database password. This is more secure than using SPOOLMAN_DB_PASSWORD. |
|
| SPOOLMAN_DB_PASSWORD_FILE | Path of file which contains the database password. This is more secure than using SPOOLMAN_DB_PASSWORD. |
|
||||||
| SPOOLMAN_DB_PASSWORD | Database password |
|
| SPOOLMAN_DB_PASSWORD | Database password |
|
||||||
| SPOOLMAN_DB_QUERY | Query parameters for the database connection, e.g. set to "unix_socket=/path/to/mysql.sock" to connect using a MySQL socket. |
|
| SPOOLMAN_DB_QUERY | Query parameters for the database connection, e.g. set to `unix_socket=/path/to/mysql.sock` to connect using a MySQL socket. |
|
||||||
|
|
||||||
## Data
|
|
||||||
|
|
||||||
The objects that this web service stores are:
|
|
||||||
|
|
||||||
### Spool
|
|
||||||
|
|
||||||
An individual spool of filament.
|
|
||||||
|
|
||||||
Attributes: first use, last use, filament, weight left, location, lot/batch number, comment
|
|
||||||
|
|
||||||
### Filament
|
|
||||||
|
|
||||||
A type of filament from a specific vendor.
|
|
||||||
|
|
||||||
Attributes: name+color, vendor, material, price, density, diameter, net weight, spool weight, article number, comment
|
|
||||||
|
|
||||||
### Vendor
|
|
||||||
|
|
||||||
A filament producer.
|
|
||||||
|
|
||||||
Attributes: name, comment
|
|
||||||
|
|||||||
Reference in New Issue
Block a user