HungpmSE00234x's FUNiX Capstone Project.
Development environment requirements:
Database Preparation (MUST)
Spin up database:
make dev_db_up
- First time running will take a few minutes to complete. Please be patient.
phpMyAdmin
will be available atlocalhost:8081
after spinning up the database.- Default database name is
qrmos
.
After spinning up DB for the first time, we need to initialize data by running this command (only once):
make init_data
- This will add an
admin
user withpassword
as password.
Shutdown database:
make dev_db_down
- Shuting down database doesn't remove data in database, when spin up again, data will still be available. To completely clean up everything, use the clean command below.
Clean up database:
make dev_db_clean
Run backend:
make dev_run_backend
Run frontend:
make dev_run_frontend
Build QRMOS:
make build
- Built files are located in
build
folder at root.
Config env variables
Default environment variables are specified in backend/.default.env
. It will be copied to build
folder during building.
For production code, default env variables will be read from .default.env
.
To ovewrite those env, create a .env
file, and add env variable to it.
Or simple export env variables to current process, example:
export APP_ENV=prod
Run built code:
make run_built
Currently deployed to DigitalOcean's droplet. Read here for setup instruction
[Optional] Push main
branch to origin
remote since prod's backend will be built based on this.
git push origin main
Deploy:
make deploy