Skip to content
Snippets Groups Projects
Commit 97b80cc8 authored by Rémi PAILHAREY's avatar Rémi PAILHAREY :fork_knife_plate:
Browse files

docs: updated handle assets

parent 7458969a
No related branches found
No related tags found
1 merge request!23Update handle assets
......@@ -43,6 +43,7 @@
"nginx",
"noreply",
"numerique",
"Openshift",
"Scaleway",
"timestep",
"usageevent"
......
......@@ -3,4 +3,4 @@
:warning: WIP :warning:
The different routes exposed by the backend are described by Swagger documentation.
Once the api deployed, the documentation is accessible at https://HOSTNAME/swagger/index.html
\ No newline at end of file
Once the api deployed, the documentation is accessible at https://HOSTNAME/swagger/index.html
......@@ -8,7 +8,7 @@ It is running a crontab that execute the backup.sh script every day at midnight.
The dump of the database are stored in folders name like this : "ecolyo-agent-YEAR-MONTH-DAY-HOUR-MINUTE-SECOND". Only the 14 last days are stored.
The location of the backup folder on the server is specified in the volumes of the "database-backup" service, in the docker-compose file.
The location of the backup folder on the server is specified in the volumes of the "database-backup" service, in the docker-compose file.
## Backup manually
......
# Deploy Ecolyo-Agent application
This app is deployed on an Openshift cluster provided by Synaaps, all instructions for authentification and deployment are given [here](https://forge.grandlyon.com/web-et-numerique/factory/llle_project/backoffice-server/-/blob/dev/k8s/README.md)
......@@ -43,7 +43,7 @@ To stop it properly use
yarn local-down
```
This app runs in https, such as the backend, to access it go on https://localhost/
This app runs in https, such as the backend, to access it go on <https://localhost/>
Also make sure you have HTTPS env variable set to true.
Do not use the app with the port 3000, you won't be able to login.
......@@ -76,9 +76,9 @@ You should obtain the following messages:
> --- Server is starting ---
> Token signing key set
> Mock OAuth2 server Listening on: http://localhost:8090
> Mock OAuth2 server Listening on: <http://localhost:8090>
Once the application is started, you can access it here: [localhost](https://localhost)
Once the application is started, you can access it at <https://localhost>
## Alpha usage
......
# Handle assets
# Handle email assets
This section will allow you to import the assets used in the newsletter from Ecolyo
## Import assets
In the rec or prod server, in the folder `scripts`, there is the following script, named [`import-convert-assets.sh`](https://forge.grandlyon.com/web-et-numerique/factory/llle_project/backoffice-client/-/blob/dev/scripts/import-convert-assets.sh).
When email or ecogesture assets changes in Ecolyo project, you need to update them in the backoffice's server.
To import assets for the ecogesture images, run it
### Convert the assets
```sh
sudo sh import-convert-assets.sh
```
This step is needed to convert some svg files and all ecogestures.
Check that a "image-lib" folder has been created, that it contains a "ecogesture" folder and some PNG images and that the owner of the "image-lib" folder is the user id 1000.
- Go to the backoffice server [pipelines page](https://forge.grandlyon.com/web-et-numerique/factory/llle_project/backoffice-server/-/pipelines/new).
- Run a new pipeline for **master** branch.
!!! note "Optional"
You can specify from which Ecolyo branch you would like to get assets by overwriting _ECOLYO_ASSETS_BRANCH_ variable with a branch name (ex: 123-new-feature).
- Launch manually the job **import-convert-assets**
Once the job is finished, an artifact containing the required assets is created on GitLab.
### Import the assets on OpenShift
- Connect to the Openshift console
- Select the correct project (REC or PROD)
- Connect to the terminal of ecolyo-agent-server
- Go to the volume folder `cd /app/mnt`
- Import assets generated previously
`curl --header "PRIVATE-TOKEN:<BACKOFFICE-API-TOKEN>" https://forge.grandlyon.com/api/v4/projects/621/jobs/artifacts/master/download?job=import-convert-assets --output image-lib.zip`
>This command fetches the latest artifact for the **import-convert-assets** job
- Extract and overwrite current assets `unzip -o image-lib.zip`
If everything is successful you can go to <https://ecolyo-agent-rec.apps.com/assets/> or <https://ecolyo-agent.apps.com/assets/> to check your updated images.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment