-
Notifications
You must be signed in to change notification settings - Fork 5
Configuration
To setup the system you need a couple of configurations.
Make sure you have Fuseki installed.
Install Solr.
Redis is also required (for the backend).
Python3.10 and daphne is also required.
git clone [email protected]:judaicalink/judaicalink-labs.git
Check if you need to setup github keys for pull requests.
Create a virtual enviroment in the root directory.
python3.10 -m venv venv
Activate the virtual environment.
source venv/bin/activate
Install all the python requirements.
pip install -r requirements.txt
If it does not install properly try the --user
option to install for the user only.
You need to enable the logs for logging.
In the root directory run:
mkdir labs/logs
touch labs/logs/labs.log
If there is an error check the permissions.
Make sure npm installed on your machine. Use a npm virtual environment. This is necessary to build and package the template which is a customized bootstrap version. It bundles css, javascript and vue with webpack to one compressed zip file to load faster.
Go into the labs
directory.
Run:
npm install
Maybe you want to update the packages.
npm audit npm fund
Now build the bundle.
npm run build
Copy the static files.
npm run cs
Copy the sample.env file to the .env file in the labs folder (where manage.py is located).
cp sample.env .env
Now edit the .env file to your needs.
Make sure you have at least the database, REDIS, FUSEKI and SOLR configured.
To automate the processes you need to copy the following scripts to the root directory.
They are found in the Judaicalink Setuop Repository. But this is a private reposity and you need to request permissions.
Copy update.sh
and runserver.sh
into the root directory.
Also make the scripts executable, otherwise they won't run.
Running ./update.sh
fetches all the updates from the github reposity and installs and compiles everything.
runserver.sh
runs the server.
To start the server in the terminal run:
./runserver.sh start
To sop the server run:
./runserver.sh stop
Pay attention! When you disconnect from the terminal the server also stops unless you use tmux.
Therefore install the labs.service to run it as a daemon.
Copy labs.service
to /etc/systemd/system/
and reload the services.
Now you can start and stop the server using systemctl.
To start:
sudo systemctl start labs
To stop:
sudo systemctl stop labs
This may help if you run into error:
-
Check for the correct requirements. Besides the service everything should run without being root.
-
Check for the correct paths.
-
Check if all the required systems are installed and configured correctly.
-
Check if the log file exists.
-
Check if you installed and activated the virtual enviroment.
-
Always activate the virtual environment and run the commands with the activated enviroment.
-
Activate the debug mode.
-
Clean the caches in your browser (use the developer console > application > clear site data).
-
If the template does not load correctly disable or set the correct mime checking on NGINX. This usually causes the error 404 on the console.
Judaicalink - https://www.judaicalink.org
© JudaicaLink: Hochschule Mannheim, FID Judaica: UB Johann Christian Senckenberg, Frankfurt am Main.