billux / Georiviere-public

Web portal of valorisation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Georiviere

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

Installation for production

With docker (recommended)

Installation

Follow those instructions in order to install the application on your server :

  1. Download zip archive
unzip install.zip
cd georiviere-public
cp .env.dist .env
  1. Modify .env as needed and change your customization

  2. Build your image

docker compose build

Note : Whenever you need to change your translation or the .env. You have to rebuild the image.

  1. Launch the service :
docker compose up -d

You can now access the application by visiting http://localhost:8080/ ! 🎉

Maintenance

Whenever you change the settings you need to relaunch and rebuild the service :

docker compose down
docker compose build
docker compose up -d

Without docker (not recommended)

You can locally build and launch the application using yarn, following the same method used in development.

yarn build
yarn start

Process manager

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

Customization

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 override favicon-16x16.png, favicon.png, and apple-touch-icon.png in the same folder.

Development

To install the app in development, follow those steps:

Prerequisite

  • You need to use a node version above 18
  • Use nvm and then:
nvm use

Install yarn

npm install -g yarn

Install dependencies

yarn

Environnements variables

cp .env.dist .env

Open the .env file and modify its contents with your own API url and portal number.

Start the application in development mode

Once your dependencies are installed and the .env file and your customization are defined, start your server in development mode by running:

yarn dev

About

Web portal of valorisation


Languages

Language:TypeScript 95.7%Language:JavaScript 2.3%Language:CSS 1.3%Language:Dockerfile 0.7%