Georiviere is the public web application displaying the interface you can use to value your waterways and where users can contribute.
1. Installation for production
2. Customize your application
3. Documentation for developers
Follow those instructions in order to install the application on your server :
- Download zip archive
unzip install.zip
cd georiviere-public
cp .env.dist .env
-
Modify .env as needed and change your customization
-
Build your image
docker compose build
Note : Whenever you need to change your translation or the .env. You have to rebuild the image.
- Launch the service :
docker compose up -d
You can now access the application by visiting http://localhost:8080/ ! 🎉
Whenever you change the settings you need to relaunch and rebuild the service :
docker compose down
docker compose build
docker compose up -d
You can locally build and launch the application using yarn, following the same method used in development.
yarn build
yarn start
In order to have a more robust solution to serve your node server, if you don't want to use Docker which is the main method, our advice is to use pm2.
Here is a quick guide on how to use pm2 with an Ubuntu distribution (Make sure you've installed nodejs and built the project following the previous step)
sudo npm install -g pm2
PORT=3000 pm2 start yarn --name georiviere-public -- start
Here we specify that the port we want to run our server on is the 3000, that the starting command is yarn start
and the name of our process should be georiviere-public
.
You can see all your processes and their status by running:
pm2 status
To stop your process:
pm2 stop georiviere-public
To start your process:
pm2 start georiviere-public
You will also be able to see the application logs by running:
pm2 logs georiviere-public
Edit the following files to personalize your application:
- CSS settings: You can modify /src/styles/global.css. The project uses Tailwind CSS. You can also modify colors variables (defined in HSL; See the Tailwind CSS documentation for more information).
- Locale messages for the application /transation/fr.json. For the moment there is only the french version available.
- Global customization settings (header/footer/homepage) defined in /src/customization/settings.json.
- If you need to store images (or others medias), you can drop it in
/public/medias
. To define your favicons, you need to overridefavicon-16x16.png
,favicon.png
, andapple-touch-icon.png
in the same folder.
To install the app in development, follow those steps:
- You need to use a node version above 18
- Use nvm and then:
nvm use
Install yarn
npm install -g yarn
yarn
cp .env.dist .env
Open the .env
file and modify its contents with your own API url and portal number.
Once your dependencies are installed and the .env
file and your customization are defined, start your server in development mode by running:
yarn dev