Note: Documentation will be updated in soon.
Hi there, this project developing to provide you with a fast way to deploy your ticket system. You can use our other project TreS as a bridge between users and Burrito API. Burrito API can run in several modes:
burrito standalone(monolithic)burrito cluster(microservices)
This mode runs in a single process.
- First of all, you need to prepare environment variables. You can create .env file in the same directory as the
burritofolder, this file contains environment variables to configure our app, tests, and database.
Note: Firstly Burrito API reads config from the local
.envfile, then it can be overwritten by environment variables prepared from the console.
touch .env-
Necessary variables for containers
burrito_api- contain main logicBURRITO_DB_NAME- database nameBURRITO_DB_USER- username allowed to interact with the databaseBURRITO_DB_PASSWORD- user passwordBURRITO_DB_HOST- database IP or domainBURRITO_DB_PORT- database portBURRITO_HOST- specifyBurrito APIhostBURRITO_PORT- specifyBurrito APIportBURRITO_REDIS_HOST- redis IP or domainBURRITO_REDIS_PORT- redis portBURRITO_REDIS_USER- user for authorizationBURRITO_REDIS_PASSWORD- user passwordBURRITO_JWT_SECRET- this key is used to encrypt/decrypt JWT tokensBURRITO_JWT_ACCESS_TTL- access token's expiration timeBURRITO_JWT_REFRESH_TTL- refresh token's expiration timeBURRITO_MONGO_HOST- mongo hostBURRITO_MONGO_PORT- mongo portBURRITO_MONGO_DB- database name to store date in mongoBURRITO_MONGO_USER- mongo userBURRITO_MONGO_PASSWORD- password for authorizationBURRITO_SSU_KEY- used for authorization via SSU cabinet (only for students of this university however you can write your own auth plugin)BURRITO_WEBSOCKET_HOSTBURRITO_WEBSOCKET_PORTBURRITO_SMTP_SERVER- SMTP server IP or domainBURRITO_EMAIL_LOGIN- login for Burrito emailBURRITO_EMAIL_PASSWORD- password for Burrito email
burrito_db- contain MySQL database (you can find more information aboutMySqldocker container and its environment variables hereMYSQL_ROOT_PASSWORDMYSQL_DATABASEMYSQL_USERMYSQL_PASSWORD
burrito_redis- contains access/refresh tokens (no variables are needed)burrito_mongo- contains comments, ticket changelog (full history), notifications data and files using GridFS. (you can find more information aboutmongodocker container and its environment variables hereMONGO_INITDB_ROOT_USERNAMEMONGO_INITDB_ROOT_PASSWORD
-
Build Burrito API
docker build -t burrito_api .- Launch needed databases
make dbs- Launch Burrito API
docker run --rm -p8080:8080 --env-file .env --name burrito_api --network burrito_party burrito_apiThis mode runs in several processes.
-
The environment variables are necessary as well as in the
burrito standalonemode. All rules related to environment variables are the same as in the mentioned mode. -
Available containers
burrito_about- container to provide information about development teamsburrito_admin- contain logic for adminsburrito_anon- logic for anon usersburrito_auth- provides authorization abilityburrito_comments- provide access to manipulate with comments attached to the ticketburrito_iofiles- process file uploading/downloadingburrito_meta- provide meta information related to the projectburrito_notifications- send/receive notificationsburrito_profile- allow to manipulate with own profile and view otherburrito_registration- user registration (will be deleted soon from this branch, this ability will be available on theburrito_basebranch)burrito_scheduler- contain scheduled tasks and it's able to setup database if it was not already doneburrito_tickets- provides the ability to manipulate users with their tickets, view other tickets ...burrito_db- contain MySQL databaseburrito_nginx- proxy-server and load balancer forburrito cluster(no variables are needed)burrito_redis- contains access/refresh tokens (no variables are needed)
-
Launch needed databases (if you would not setup own) in docker compose
make dbs- Launch Burrito API (as you run first time the containers will fail to start, but they will be restarting while setuping database by container
burrito_scheduler)
docker-compose -f docker-compose-separated.yml up