Full Deployment
This guide demonstrates how to set up and run Binacle.Net with all features enabled, including Azurite as the database provider for the Service Module, OpenTelemetry for monitoring, and Aspire Dashboard for observability.
π οΈ 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
docker-compose.ymlPresets.jsonJwtAuth.jsonOpenTelemetry.Production.jsonaspire-dashboard-config.json
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-full-deployment
This will set the project name for Docker Compose, allowing you to run multiple instances without conflicts.
π Running the Application
In the project directory, start the application by running:
docker compose up
This will launch Binacle.Net with the following features:
- π Swagger UI: http://localhost:8080/swagger/ for easy API exploration.
- πΎ Azurite Storage Emulator: Simulates Azure Storage locally. Data is persisted in the
./azuritefolder across container restarts. - βοΈ Service Module: Uses Azurite as its database provider for local storage operations.
- π₯οΈ UI Module: Accessible via http://localhost:8080/, offering an interactive packing demo.
- π OpenTelemetry: Collects telemetry data for monitoring and exports it to the Aspire Dashboard.
- π Aspire Dashboard: Accessible via http://localhost:18888 for real-time metrics and performance monitoring.
- π Logs Folder: A
./data/logsfolder will be created to store application logs for monitoring and debugging.
π Accessing the API, UI and Aspire Dashboard
-
API Documentation (Swagger UI):
http://localhost:8080/swagger/
Use this to explore and test API endpoints directly. -
UI Module (Packing Demo):
http://localhost:8080/
Interact with Binacle.Net through a user-friendly interface. -
Aspire Dashboard:
http://localhost:18888
Monitor real-time metrics and performance of Binacle.Net services.
βοΈCustomizing the Configuration
- ποΈCustom Presets:
Edit thePresets.jsonfile to modify bin configurations. Changes will take effect after restarting the application:docker compose down docker compose up - π JWT Authentication:
Adjust authentication settings in theJwtAuth.jsonfile as needed. - π OpenTelemetry:
Customize telemetry configuration by editingOpenTelemetry.Production.json. - π Aspire Dashboard:
Adjust settings inaspire-dashboard-config.jsonto fine-tune the dashboard.
π 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.
π οΈ Getting the Aspire Dashboard Login Token
The Aspire Dashboard generates a login URL with a token for access.
View the Logs: After starting the deployment, run the following command:
docker-compose logs -f aspire-dashboard
Locate the Login URL: In the logs, find a line like:
Login to the dashboard at http://localhost:18888/login?t=your_token_here.
Access the Dashboard: Copy the URL and open it in your browser. Youβll be logged in automatically
π Additional Resources
Happy packing! π¦β¨