biene
represents an electronic hive card
biene
is a Rust/Typescript application which connects to an existing postgresql database and handels organisation of bee hives. The desktop application uses tauri
and inside tauri
vue
is used.
biene
uses diesel
for database handling (supports multiple database types). Thus, diesel_cli
must be available. A detailed description can be found in diesel
Getting Started.
In addition, the DATABASE_URL
environmental variable has to be set either using export DATABASE_URL=postgres://username:password@localhost:port/database_name
or create a .env
file in the project root folder with the variable:
echo DATABASE_URL=postgres://username:password@localhost:port/database_name > .env
Be aware that diesel might apply changes on your database so you should consider using a sample database and load a dump of your data within this isolated database.
To build the application a current node.js and Rust version is required.
Once both is installed and prepared. You should use the following steps to run the app in development mode:
npm install
to install all required node modules.npm run tauri dev
to run the application and to install potential missing rust crates.
That's it :)
A Dockerfile
is included to run the application from within a Docker container. Therefore the following two steps are required:
- Build the container with
docker build -t tauri .
from root directory - Run the container with
docker run -it --rm --env="DISPLAY=host.docker.internal:0" tauri
. On MacOS xQuartz is required and the environmental variable should be available. To enable XQuartz,ip=$(ifconfig en0 | grep inet | awk '$1=="inet" {print $2}')
export DISPLAY="$ip:0.0"
(export local monitor by setting environmentalDISPLAY
variable)xhost +
(grant access for all)
The docker-compose.yml
also creates some testing database.
When running docker-compose up
, be aware to have XQuartz running (xhost +
)