Presets
A preset is a named bin set. Define it once in Presets.json and a request names the preset instead of
carrying the bins. The shipped file holds example presets; replacing it with your own bins is the first thing
to do, because until then every answer describes someone elseβs packaging.
Centimetres are assumed, but any unit works as long as every bin and every item uses the same one, as integers. Core Concepts has the rest of what a dimension must be.
π¦ Choosing Your Bin Set
A preset is whatever you pack into, and there are two ways to define it:
- The destinationβs sizes - the locker compartments, the shelf, the pallet. Space is used as well as it can be, and the answer says directly whether an order fits where it is going. The cost is one preset per carrier or destination, kept in step with what they offer.
- Your own boxes - the packaging you stock. One preset, and packing stays the same whoever delivers. The cost is the space a box wastes when it does not match the compartment it ends up in.
Both are just bins in the file. Keep one preset per set and name it after what it is.
π οΈ Configuration
Presets are stored in the Presets.json file.
This file contains predefined bin configurations that can be used directly in your packing operations.
Default configuration:
{
"PresetOptions": {
"Presets": {
"rectangular-cuboids": {
"Bins": [
{ "ID": "Small", "Length": 60, "Width": 40, "Height": 10 },
{ "ID": "Medium", "Length": 60, "Width": 40, "Height": 20 },
{ "ID": "Large", "Length": 60, "Width": 40, "Height": 30 }
]
},
"perfect-cubes": {
"Bins": [
{ "ID": "Small", "Length": 10, "Width": 10, "Height": 10 },
{ "ID": "Medium", "Length": 20, "Width": 20, "Height": 20 },
{ "ID": "Large", "Length": 30, "Width": 30, "Height": 30 }
]
},
"sample": {
"Bins": [
{ "ID": "Small", "Length": 62, "Width": 45, "Height": 8 },
{ "ID": "Medium", "Length": 62, "Width": 45, "Height": 17 },
{ "ID": "Large", "Length": 62, "Width": 45, "Height": 36 }
]
}
}
}
}
Although you can modify the presets using any method described in the Configuration page, itβs generally recommended to replace the entire file rather than making incremental changes.
Please refer to the Configuration > Direct File Edits section of the page for more information on overriding configurations.
- π Location:
/app/Config_Files - π Full Path:
/app/Config_Files/Presets.json
π Overriding Presets
There are multiple ways to override the default Presets.json file, particularly when using Docker.
Below are two methods for overriding the presets file in a Docker environment:
π₯οΈ Option 1: Command Line
- Download the Presets.json file and modify it according to your needs.
- Place the modified
Presets.jsonfile anywhere on your system. - Open your terminal and navigate to the directory containing your modified Presets.json file.
- Run the following Docker command to mount the updated presets file:
docker run --name binacle-net \
-p 8080:8080 \
-e SWAGGER_UI=True \
-v $(pwd)/Presets.json:/app/Config_Files/Presets.json:ro \
binacle/binacle-net:3
If you are running under Windows replace
$(pwd)with%cd%and\with^, so the command looks like this:
docker run --name binacle-net ^
-p 8080:8080 ^
-e SWAGGER_UI=True ^
-v %cd%\Presets.json:/app/Config_Files/Presets.json:ro ^
binacle/binacle-net:3
Since we are using a bind mount for a single file, the full path must be provided.
π Option 2: Docker Compose
If you prefer to use Docker Compose, follow these steps:
- Create a Docker Compose file (compose.yaml) if you donβt already have one.
- Download the Presets.json file and modify it according to your needs.
- Place the modified Presets.json file in the same directory as your compose.yaml.
- Navigate to the directory containing both the Presets.json and compose.yaml files.
- Run the following command:
docker compose up
Docker Compose File Template
Using the long syntax in the Docker Compose file allows you to specify a relative path rather than an absolute one.
services:
binacle-net:
image: binacle/binacle-net:3
ports:
- "8080:8080"
volumes:
- type: bind
source: ./Presets.json
target: /app/Config_Files/Presets.json
read_only: true
environment:
- SWAGGER_UI=True
- SCALAR_UI=True