To run the project you need to have installed docker and docker-compose. Steps:
download the project
create the file /.envs/.production/.backend (see the /.envs/.local/.backend file) using the following indications:
create the file /.env (see the /.env.example file) using the following indications:
open the shell in the main folder of the project
run the following commands:
sudo docker compose -f production.yml up --build --detach
or for older versions of docker-compose
sudo docker-compose -f production.yml up --build --detach
When the build finishes the project will be reachable at the PORT_OUT of the host
To update the application pull the update from github then from the project folder rebuild the docker container using the following command:
sudo docker compose -f production.yml up --build --detach
or for older versions of docker-compose
sudo docker-compose -f production.yml up --build --detach
The project is structured this way:
frontend : The app is built as a monorepo using nx
apps
cms : is the "back-office" application made with reactjs using react-admin library. Using the cms the user can publish his research and download the static files of the created research.
export-site: is the application neeeded to generate the export of the research. This app is made using nextjs.
libs
shared
ui-site: These are the visualization components of the site used both in the preview of the csm and in the export-site project. They are also used in forms for creating block content.
To start editing the app we need to setup the dev workspace
Use the following command to run the backend app:
sudo docker compose -f local.yml up --build
This command will run a django server on the port 8000 and will save the db data to the folder "data" outside the project root. Now your backend is up and ready to accept connections
Open the shell in the /frontend folder and run the following commands: First of all install nx globally:
npm install -g nx
npm ci
These commands will install all the dependecies needed to run the project. Then we need to serve the main app using the following command:
nx serve cms
Now you can start editing the files.