Fermitech Softworks website written in Python, Jinja2, Javascript and HTML.
-
Clone this repository using
git:git clone https://github.com/Fermitech-Softworks/Fermitech-Website.git -
Create a new
venv:python -m venv venv -
activatethe venv you just created:source venv/bin/activate -
Install the requirements using
pip:pip install -r requirements.txt
-
Use
exportto set the required environment variables:export COOKIE_SECRET_KEY='qwerty' # A random string of characters
-
Run the
flaskdevelopment server:python server.py
-
Use
exportto set the required environment variables:export COOKIE_SECRET_KEY='qwerty' # A random string of characters
-
Run the
flaskdevelopment server. This will create the database:python server.py
-
Create the file
/etc/systemd/system/web-fermitech-site.servicewith 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
-
Create the file
/etc/systemd/system/web-erre2.service.d/override.confwith the following contents:[Service] Environment="COOKIE_SECRET_KEY=qwerty" # A random string of characters
-
Reload all
systemddaemon files:systemctl daemon-reload -
start(and optionallyenableto run at boot) theweb-erre2systemd service:systemctl start web-fermitech-site systemctl enable web-fermitech-site -
Configure a reverse proxy.