Minimal Setup
This sample demonstrates how to set up and run Binacle.Net with custom presets using Docker Compose. It is a minimal setup that showcases basic API functionality with customizable bin configurations.
π οΈ Prerequisites
Before you start, make sure you have the following installed on your machine.
- Docker
- Docker Compose (included with Docker Desktop)
Download the following files
Place these files in a directory of your choice. This directory will be your project root.
Customize (Optional)
Edit the Presets.json file to adjust the bin configurations as per your needs.
Create a .env file in the same directory with the content:
COMPOSE_PROJECT_NAME=binacle-net-minimal-setup
This will set the project name for Docker Compose, allowing you to run multiple instances without conflicts.
π Running the Application
In the project root, start the application by running:
docker compose up
This will launch the Binacle.Net API with:
- π Swagger UI: http://localhost:8080/swagger/ for easy API exploration.
- π Logs Folder: A
./data/logsfolder will be created to store API logs for monitoring and debugging.
π Accessing the API
Once the containers are running, open your browser and go to:
http://localhost:8080/swagger/
Here, you can explore and test the API endpoints with an intuitive interface.
βοΈ Customizing Presets
To modify bin configurations:
- Open the
Presets.jsonfile in your preferred editor. - Make your changes to the bin definitions.
- Restart the application to apply the updates:
docker compose down docker compose up
Your custom presets will now be active in the API.
π Logs Folder
When running the application, a ./data folder will be created to store application data,
including logs for monitoring and debugging. Itβs important to ensure that the ./data and ./data/logs
directories have write permissions for proper functionality.
Setting Permissions
Run the following commands to create the directory and set the required permissions:
mkdir -p ./data/logs
sudo chmod -R 777 ./data
This will grant full access to ./data and its subdirectories.
777 gives full access to all users. Adjust permissions as needed for security.
π Additional Resources
Happy packing! π¦β¨