Skip to content

Latest commit

 

History

History
80 lines (63 loc) · 3.36 KB

README.md

File metadata and controls

80 lines (63 loc) · 3.36 KB

Bio-Manager

This web application is a kind of ERP system specially adapted to the requirements for the management of certified organic plots of land. It should be easy to use and simplify administrative work.

The purpose of the project is also to get a better understanding of the concepts and systems working in the background e.g. in the Laravel framework. That is why everything is self written and very similar to Laravel. The concepts, naming conventions and schemes etc. are copied from Laravel while the implementation of the underlying code is written by myself.

This project works with a self written framework.
It contains:

  • an autoloader
  • a router
  • a testing framework
  • internationalization support
  • rendering views and components
  • extendable CLI e.g. for running tests, creating controllers, models, etc.
  • a database migration system
  • a database model with magic getter and setter functions
  • a query builder

Links

Getting started

One way to run the application is the usage of docker.

Requirements

The application uses a MariaDB to store the data. You must run a MariaDB server that the container can access. On this server a database with the name bioman must exist (Can be changed in .env or via environment variable: DB_DATABASE).

Download the docker image

You can use the latest version: (This is not recommended as it might by unstable)

docker pull ghcr.io/masterzydra/bio-manager:latest

Or use a specific version:

docker pull ghcr.io/masterzydra/bio-manager:v2.0.0

You can find all versions here.

Run the docker image

Because the docker image serversideup/php:8.X-fpm-apache is used as base image the SSL_MODE can be changed (more details). The default values from .env.example can be overwritten by setting the new value as environment variable.

docker run -p 8080:80 --env SSL_MODE=off --env DB_USERNAME=root --env DB_PASSWORD=toor ghcr.io/masterzydra/bio-manager:latest

Default credentials

While the docker container is starting, it executes the migrate command. It creates a user account with the username admin and the password mySecurePassword1!. It is recommended to change the password or delete the user after a new one is created.

Development

The development can be done with just Visual Studio Code and Docker.

Start the MariaDB database:

docker run -d --network host --env MARIADB_USER=user --env MARIADB_PASSWORD=secret --env MARIADB_DATABASE=bioman --env MARIADB_ROOT_PASSWORD=secret --name mariadb mariadb:latest

Restart the MariaDB container e.g. after system restart:

docker restart mariadb

Run the application:

docker run --rm -d --network host -e PUID=$UID -e PGID=$UID --env SSL_MODE=off --name bioman -v $(pwd):/var/www/html:z ghcr.io/masterzydra/bio-manager:latest

Execute the bioman CLI:

Hint: If you add the following to your ~/.bash_aliases, you can call the bioman CLI with just bioman:
alias bioman="docker exec -it bioman /command/s6-setuidgid webuser php bioman"

docker exec -it bioman /command/s6-setuidgid webuser php bioman