Skip to content
Snippets Groups Projects
Commit 973a6cb3 authored by Yoan VALLET's avatar Yoan VALLET
Browse files

Merge branch 'feat/prices-doc' into 'master'

feat/add-prices-doc

See merge request web-et-numerique/llle_project/self-data-technical-doc!8
parents 563c6066 ae56ddf8
No related branches found
No related tags found
1 merge request!8feat/add-prices-doc
Pipeline #21857 passed
# Introduction
## Newsletter
The goal is to send newsletters following this design :
![Architecture principles](/img/ecolyo-agent/newsletter-template.png)
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
......@@ -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 !
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment