diff --git a/docs/ecolyo/ecolyo-agent/functionalities/general.md b/docs/ecolyo/ecolyo-agent/functionalities/general.md index 0241c922581d121737c3220a3f4d7a92f60d16a7..19db4081a7e48306457c70be55e87cf75df38c38 100644 --- a/docs/ecolyo/ecolyo-agent/functionalities/general.md +++ b/docs/ecolyo/ecolyo-agent/functionalities/general.md @@ -1,13 +1,35 @@ # Introduction +## Newsletter The goal is to send newsletters following this design :  -There are 3 different sections : +There are 4 different sections : + +- subject : manages the mail subject - monthlyInfo : contains a image URL and some global information - monthlyNews : contains an editable title and some information about the novelties -- poll : contains a question and a link to answer a survey \ No newline at end of file +- poll : contains a question and a link to answer a survey + +## Partners issues + +This section allow the admin to activate alerts in the ecolyo app when a partners API is down. +Admin has to activate the modal switch AND at least one fluid switch to make it work. He also has to set the switches to off position manually when the concerned APIs are back to normal + +## Prices + +This section manages the prices for each fluid in the ecolyo application. + +### Rules + +- The next price to create is automatically pre-selected by default +- Only the 2 last prices plus the one to create are editable, the others are just consultable +- Each fluid has its own date frequency : + - Electricity : one new price every 6 month (February and August) + - Water : one new price every year + - Gas : one new price every month +- When user creates a new price, the previous price's endDate is set to the new startDate minus 1 minute, so every prices keeps following in time. \ No newline at end of file diff --git a/docs/ecolyo/ecolyo-agent/getting_started/launch_local_application.md b/docs/ecolyo/ecolyo-agent/getting_started/launch_local_application.md index 6de96761462e6daac7579d0034ed4ed4eae36ad7..b085d648601a9198ac763a7523222610525beabd 100644 --- a/docs/ecolyo/ecolyo-agent/getting_started/launch_local_application.md +++ b/docs/ecolyo/ecolyo-agent/getting_started/launch_local_application.md @@ -80,3 +80,65 @@ You should obtain the following messages: Once the application is started, you can access it here: https://localhost +## Test on alpha + +In order to test the app on alpha you can do the following steps: + +- Build locally your docker image for the client and/or the server + +``` +docker build . -t registry.forge.grandlyon.com/web-et-numerique/llle_project/backoffice-<server/client>:your-tag +``` +- Push the image + +``` +docker push registry.forge.grandlyon.com/web-et-numerique/llle_project/backoffice-<server/client>:your-tag +``` + +- Connect to alpha in ssh, go to ecolyo-agent > docker-compose.yml and change the image tag for client and/or server + +- Then launch the app, it will pull automatically the new images + +``` +docker-compose up -d +``` + +- If you have access denied issue, try to docker login + +``` +docker login registry.forge.grandlyon.com/web-et-numerique/llle_project/ +``` + +- If you want to update alpha using the same image tag with edited image, just pull manually your new image and rebuild the concerned image + +``` +docker pull registry.forge.grandlyon.com/web-et-numerique/llle_project/backoffice-<server/client>:your-tag + +docker-compose up -d +``` + +If you need to work with prices on alpha, you will need to init the prices database. + +- First get the mysql container id + +``` +docker ps +``` + +- Then get into the container + +``` +docker exec -it <container-id> bash +``` + +- Then execute the mysql script that imports all the prices in DB + +``` +mysql --local-infile=1 -uroot -p backoffice < /dbinit/dbinit.sql +``` + +You will be prompted for the admin password, use the db password set in the .env file. + +Now you're ready to edit your prices on alpha ! + +