Code Monkey home page Code Monkey logo

netshareweb's Introduction

Deployment

Backend

Create Virtual Environment

cd backend
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt

Change config.py

Rename config_template.py in backend/config_template.py to config.py

Change variable values in config.py

Django Checklist

Rename settings_template.py of backend/backend/settings_template.py to settings.py Fix warnings listed by the following command

python manage.py check --deploy

Start Gunicorn Backend Server with Systemd

Rename gunicorn_template.service of backend/gunicorn_template.service to gunicorn.service

Change <NetShareWeb> in gunicorn.service to the correct path

Copy systemd unit file to system configuration directory and start the service

sudo cp gunicorn.service /etc/systemd/system/gunicorn.service
sudo systemctl start gunicorn
sudo systemctl enable gunicorn

sudo systemctl status gunicorn

Backend server is running on port 8000

Frontend

(OPTIONAL) Install NodeJS 18.16.0

Install nvm

Follows the instructions after running this command

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash

Install NodeJS with nvm

nvm install 18.16.0

Install Dependencies

cd frontend
npm install

Start NextJS Frontend Server with pm2

npm install -g pm2
pm2 start pm2.config.js

Frontend is running on port 3000

NGINX

Install NGINX

sudo apt update
sudo apt install nginx

Rename netshareweb_template.conf of nginx/netshareweb_template.conf to netshareweb.conf

Change variables wrapped with <> in gunicorn_nginx.conf to the correct value

HTTPS certificates can be placed in the nginx/ directory

Copy NGINX configuration file to the NGINX directory and reload NGINX

sudo cp netshareweb.conf /etc/nginx/conf.d/netshareweb.conf
sudo nginx -s reload

netshareweb's People

Contributors

haozhesong avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.