Skip to content

ameyak04/Devops-inductions-23-task-2

 
 

Repository files navigation

Spider Devops Inductions - Task 2

Instructions after task completion:

Please login user account with Sudo previledges.

sudo -i ( to Root)

Assuming the home directory of root is /root

copy the files docker-compose-spidertask2.yaml, nginx.conf, package.json, main.rs, diesel.sh and .env to the /root directory

mkdir scripts
cd scripts
copy the file postgrescreatedb.sql to the /root/scripts directory

docker compose -f docker-compose-spidertask2.yaml up -d
this should run all the servers from /root directory
refer README.txt for the detailed instructions



Instructions before task completion:

1. Fork the given repo and set the your repo to private.
2. Setup the servers using the instructions given below
3. Dockerize the given application using Docker and Docker-compose


Tech Stack:

Language: Rust
Framework: Actix-Web
ORM: Diesel
Database: PosgreSQL
Frontend: React
Compilers: Rust v1.7.0 and node v18.0.0


How to Setup Server[Linux installation]:

  • cd Backend
  • sudo apt install libpq-dev
  • cargo install diesel_cli --no-default-features --features postgres
  • CREATE DATABASE rust_server [in psql CLI];
  • Add ENV variables for DB connection
  • diesel setup [Generates the tables]
  • cargo run [server runs]

Any problems with setting up server refer to official cargo and diesel documents



How to Setup Frontend React Server:

  • cd Frontend
  • npm i [install dependencies]
  • npm start [start react server]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 53.5%
  • JavaScript 33.1%
  • CSS 5.6%
  • PLpgSQL 5.3%
  • HTML 1.9%
  • Shell 0.6%