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
-
activate
the venv you just created:source venv/bin/activate
-
Install the requirements using
pip
:pip install -r requirements.txt
-
Use
export
to set the required environment variables:export COOKIE_SECRET_KEY='qwerty' # A random string of characters
-
Run the
flask
development server:python server.py
-
Use
export
to set the required environment variables:export COOKIE_SECRET_KEY='qwerty' # A random string of characters
-
Run the
flask
development server. This will create the database:python server.py
-
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
-
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
-
Reload all
systemd
daemon files:systemctl daemon-reload
-
start
(and optionallyenable
to run at boot) theweb-erre2
systemd service:systemctl start web-fermitech-site systemctl enable web-fermitech-site
-
Configure a reverse proxy.