Skip to content
This repository has been archived by the owner on Jan 25, 2024. It is now read-only.

Commit

Permalink
docs(archive): add archive disclaimer to main readme (#462)
Browse files Browse the repository at this point in the history
  • Loading branch information
vvatelot authored Jan 25, 2024
1 parent bbb94aa commit ac3bfde
Showing 1 changed file with 17 additions and 15 deletions.
32 changes: 17 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
:warning: This project is being replaced by [ecoindex_python_fullstack](https://github.com/cnumr/ecoindex_python_fullstack) and will be archived soon. Please refer to the new project for any contribution or issue. :warning:

# Ecoindex-Api

This tool provides an easy way to analyze websites with [Ecoindex](https://www.ecoindex.fr) on a remote server. You have the ability to:
Expand Down Expand Up @@ -61,21 +63,21 @@ docker compose up -d --build

Here are the environment variables you can configure:

| Service | Variable Name | Default value | Description |
|-------------|----------------------------|---------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| API | `WAIT_BEFORE_SCROLL` | 3 | You can configure the wait time of the scenario when a page is loaded before it scrolls down to the bottom of the page |
| API | `WAIT_AFTER_SCROLL` | 3 | You can configure the wait time of the scenario when a page is loaded after having scrolled down to the bottom of the page |
| API | `CORS_ALLOWED_CREDENTIALS` | `True` | See [MDN web doc](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Credentials) |
| API | `CORS_ALLOWED_HEADERS` | `*` | See [MDN web doc](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Headers) |
| API | `CORS_ALLOWED_METHODS` | `*` | See [MDN web doc](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Methods) |
| API | `CORS_ALLOWED_ORIGINS` | `*` | See [MDN web doc](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin) |
| API, Worker | `DAILY_LIMIT_PER_HOST` | 0 | When this variable is set, it won't be possible for a same host to make more request than defined in the same day to avoid overload. If the variable is set, you will get a header `x-remaining-daily-requests: 6` in your response. It is used for the POST methods. If you reach your authorized request quota for the day, the next requests will give you a 429 response. If the variable is set to 0, no limit is set |
| API, Worker | `DATABASE_URL` | `sqlite+aiosqlite:///./sql_app.db` | If you run your mysql instance on a dedicated server, you can configure it with your credentials. By default, it uses an sqlite database when running in local | |
| API, Worker | `WORKER_BROKER_URL` | `redis://localhost:6379/0` | The url of the redis broker used by Celery |
| API, Worker | `WORKER_BACKEND_URL` | `redis://localhost:6379/1` | The url of the redis backend used by Celery |
| Worker | `ENABLE_SCREENSHOT` | `False` | If screenshots are enabled, when analyzing the page the image will be generated in the `./screenshot` directory with the image name corresponding to the analysis ID and will be available on the path `/{version}/ecoindexes/{id}/screenshot` |
| Worker | `CHROME_VERSION` | `107.0.5304.121-1` | This is the version of chrome to download and run. Can be removed if you want to install latest version of chrome |
| Worker | `CHROME_VERSION_MAIN` | `107` | This is the major version of chromethat is used for chromedriver. You have to set it accordingly to `CHROME_VERSION`. Be careful that if you remove `CHROME_VERSION` and `CHROME_VERSION_MAIN` or that they do not match, chromedriver will fail |
| Service | Variable Name | Default value | Description |
| ----------- | -------------------------- | ---------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| API | `WAIT_BEFORE_SCROLL` | 3 | You can configure the wait time of the scenario when a page is loaded before it scrolls down to the bottom of the page |
| API | `WAIT_AFTER_SCROLL` | 3 | You can configure the wait time of the scenario when a page is loaded after having scrolled down to the bottom of the page |
| API | `CORS_ALLOWED_CREDENTIALS` | `True` | See [MDN web doc](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Credentials) |
| API | `CORS_ALLOWED_HEADERS` | `*` | See [MDN web doc](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Headers) |
| API | `CORS_ALLOWED_METHODS` | `*` | See [MDN web doc](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Methods) |
| API | `CORS_ALLOWED_ORIGINS` | `*` | See [MDN web doc](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin) |
| API, Worker | `DAILY_LIMIT_PER_HOST` | 0 | When this variable is set, it won't be possible for a same host to make more request than defined in the same day to avoid overload. If the variable is set, you will get a header `x-remaining-daily-requests: 6` in your response. It is used for the POST methods. If you reach your authorized request quota for the day, the next requests will give you a 429 response. If the variable is set to 0, no limit is set |
| API, Worker | `DATABASE_URL` | `sqlite+aiosqlite:///./sql_app.db` | If you run your mysql instance on a dedicated server, you can configure it with your credentials. By default, it uses an sqlite database when running in local | |
| API, Worker | `WORKER_BROKER_URL` | `redis://localhost:6379/0` | The url of the redis broker used by Celery |
| API, Worker | `WORKER_BACKEND_URL` | `redis://localhost:6379/1` | The url of the redis backend used by Celery |
| Worker | `ENABLE_SCREENSHOT` | `False` | If screenshots are enabled, when analyzing the page the image will be generated in the `./screenshot` directory with the image name corresponding to the analysis ID and will be available on the path `/{version}/ecoindexes/{id}/screenshot` |
| Worker | `CHROME_VERSION` | `107.0.5304.121-1` | This is the version of chrome to download and run. Can be removed if you want to install latest version of chrome |
| Worker | `CHROME_VERSION_MAIN` | `107` | This is the major version of chromethat is used for chromedriver. You have to set it accordingly to `CHROME_VERSION`. Be careful that if you remove `CHROME_VERSION` and `CHROME_VERSION_MAIN` or that they do not match, chromedriver will fail |

## Local development

Expand Down

0 comments on commit ac3bfde

Please sign in to comment.