- Install docker
curl -sSL https://get.docker.com | sh
- Allow Docker to be used without being a root
sudo usermod -aG docker $USER
- Restart
reboot
-
Make sure git is installed
sudo apt install git
-
Clone this project
git clone https://github.com/mohamednehad450/Scheduler.git cd Scheduler
-
Build the image
docker build -t scheduler .
-
Create a container
docker container create --name scheduler_container -p 8000:8000 -v /sys:/sys -e TOKEN_KEY=$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 50) scheduler
-
Start the container
docker start scheduler_container
- Create the container
docker container create --name scheduler_container -p 8000:8000 -v /sys:/sys -e TOKEN_KEY=$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 50) -e DATABASE_FOLDER=database mohamednehad450/scheduler
- Start the container
docker start scheduler_container
-
Make sure git is installed
sudo apt install git
-
Clone this project
git clone https://github.com/mohamednehad450/Scheduler.git cd Scheduler
-
Install dependencies
npm install -g pnpm pnpm i
If you are having troubles installing, make sure you are running gcc/g++ -v 4.8 or higher. Here is an installation guide.
-
Build the project
pnpm build
-
Add environment variables to the
.env
file# Database file name echo DATABASE_FOLDER=\"database\" >> .env # Random 50 characters long string for token signing echo TOKEN_KEY=\"$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 50)\" >> .env # Server port, Default is 8000 echo PORT=\"8000\" >> .env
-
Start the server
pnpm start
All of the API documentation and database models are in api-docs.yaml
,you can view it in SwaggerHub.