Code Monkey home page Code Monkey logo

fermitech-website's Introduction

Fermitech-Website

Fermitech Softworks website written in Python, Jinja2, Javascript and HTML.

Installation

  1. Clone this repository using git:

    git clone https://github.com/Fermitech-Softworks/Fermitech-Website.git
    
  2. Create a new venv:

    python -m venv venv
    
  3. activate the venv you just created:

    source venv/bin/activate
  4. Install the requirements using pip:

    pip install -r requirements.txt
    

For development

  1. Use export to set the required environment variables:

    export COOKIE_SECRET_KEY='qwerty'  # A random string of characters
  2. Run the flask development server:

    python server.py
    

For production

Preparing for production

  1. Use export to set the required environment variables:

    export COOKIE_SECRET_KEY='qwerty'  # A random string of characters
  2. Run the flask development server. This will create the database:

    python server.py
    

Setting up production

  1. Create the file /etc/systemd/system/web-fermitech-site.service with the following contents:

    [Unit]
    Name=web-fermitech-site
    Description=Fermitech Gunicorn Server
    Wants=network-online.target
    After=network-online.target nss-lookup.target
    
    [Service]
    Type=exec
    User=fermitech-site
    WorkingDirectory=/opt/fermitech-site  # Replace with the directory where you cloned the repository
    ExecStart=/opt/fermitech-site/venv/bin/gunicorn -b 127.0.0.1:30002 server:app  # Replace with the directory where you cloned the repository
    
    [Install]
    WantedBy=multi-user.target
  2. Create the file /etc/systemd/system/web-erre2.service.d/override.conf with the following contents:

    [Service]
    Environment="COOKIE_SECRET_KEY=qwerty"  # A random string of characters
  3. Reload all systemd daemon files:

    systemctl daemon-reload
    
  4. start (and optionally enable to run at boot) the web-erre2 systemd service:

    systemctl start web-fermitech-site
    systemctl enable web-fermitech-site
    
  5. Configure a reverse proxy.

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.