From a8e81908eec627d669484f1e94e0225b9530314c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Jaussoin?= Date: Tue, 18 Mar 2025 16:39:49 +0100 Subject: [PATCH] Fix FLEXIAPI-278 Complete and reorganize the Markdown documentation --- CHANGELOG.md | 1 + INSTALL.md | 12 ++++++------ README.md | 4 ++++ RELEASE.md | 29 +++++++++++++++++++++++------ flexiapi/.env.example | 1 - flexiapi/config/app.php | 2 +- 6 files changed, 35 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 77a7c1c..167bd17 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ v1.7 - Fix FLEXIAPI-237 Add internationalisation support in the app - Fix FLEXIAPI-261 Remove the TURN part in the XML provisioning (and only keep the API endpoint) - Fix FLEXIAPI-275 Add names in Spaces +- Fix FLEXIAPI-278 Complete and reorganize the Markdown documentation v1.6 ---- diff --git a/INSTALL.md b/INSTALL.md index 183c2bf..97c502c 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -65,12 +65,12 @@ However it is possible to define a Space as a "SuperSpace" allowing the admins t You will need to create the first Space manually, generally as a SuperSpace, after that the other Spaces can directly be created in your browser through the web panel. - php artisan spaces:create-update {sip_domain} {host} {--super} + php artisan spaces:create-update {sip_domain} {host} {name} {--super} For example: - php artisan spaces:create-update company-sip-domain.tld flexiapi-domain.tld --super - php artisan spaces:create-update other-sip-domain.tld other.flexiapi-domain.tld + php artisan spaces:create-update company-sip-domain.tld flexiapi-domain.tld "My Super Space" --super + php artisan spaces:create-update other-sip-domain.tld other.flexiapi-domain.tld "My Other Space" ## 5. Create a first administrator and finish the setup @@ -93,20 +93,20 @@ Using the environnement variables you can then configure FlexiAPI per instance. With Apache, use the [mod_env](https://httpd.apache.org/docs/2.4/mod/mod_env.html) module. - SetEnv APP_NAME "VirtualHost One" + SetEnv APP_ENV "production" On nginx use `fastcgi_param` to pass the parameter directly to PHP. location ~ [^/]\.php(/|$) { … include /etc/nginx/fastcgi_params; - fastcgi_param APP_NAME "VirtualHost Two"; + fastcgi_param APP_ENV "staging"; } > **Warning** Do not create a cache of your configuration (using `artisan config:cache`) if you have a multi-environnement setup. > The cache is always having the priority on the variables set in the configuration files. -## Custom theme +## Custom Theme If you enable the Custom CSS Theme option to true in the Space administration panel, FlexiAPI will try to load a CSS file located in `public/css/$space_host.style.css`. If the file doesn't exists it will fallback to `public/css/style.css`. diff --git a/README.md b/README.md index 883ba2b..4f4bf71 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,10 @@ Since 1.7 some environnement instance configuration variables were moved into th php artisan spaces:import-configuration-from-dot-env {sip_domain} +⚠️ Be careful, during this import only the project DotEnv file variables will be imported, other environnement (eg. set in Apache, nginx or Docker) will be ignored. + +⚠️ The content of the `ACCOUNT_PROVISIONING_RC_FILE` will not be imported. You will have to extract the sections and lines that you want to use manually using the dedicated form or the API. + ### Create an admin account Create an admin account, an API Key will also be generated along the way, it might expire after a while (regarding the API Key expiration policy). An empty `api_key_ip` will remove the IP restriction on the key. diff --git a/RELEASE.md b/RELEASE.md index ebd5fa2..4fb3bde 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -11,7 +11,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/). - **Spaces:** A new way to manage your SIP domains and hosts. A Space is defined by a unique SIP Domain and Host pair. - **New mandatory DotEnv variable** `APP_ROOT_HOST`, replaces `APP_URL` and `APP_SIP_DOMAIN` that are now configured using the new dedicated Artisan script. It defines the root hostname where all the Spaces will be configured. All the Spaces will be as subdomains of `APP_ROOT_HOST` except one that can be equal to `APP_ROOT_HOST`. Example: if `APP_ROOT_HOST=myhost.com` the Spaces hosts will be `myhost.com`, `alpha.myhost.com` , `beta.myhost.com`... - - **New Artisan script** `php artisan spaces:create-update {sip_domain} {host} {--super}`, replaces `php artisan sip_domains:create-update {sip_domain} {--super}`. Can create a Space or update a Space Host base on its Space SIP Domain. + - **New Artisan script** `php artisan spaces:create-update {sip_domain} {host} {name} {--super}`, replaces `php artisan sip_domains:create-update {sip_domain} {--super}`. Can create a Space or update a Space Host base on its Space SIP Domain. ### Changed @@ -33,7 +33,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/). - ACCOUNT_PROVISIONING_OVERWRITE_ALL - ACCOUNT_PROVISIONING_USE_X_LINPHONE_PROVISIONING_HEADER -#### Migrate from [1.6] +### Migrate from [1.6] 1. Deploy the new version and migrate the database. @@ -50,9 +50,9 @@ APP_ROOT_HOST=myhost.com 3. The migration script will automatically copy the `sip_domain` into `host` in the `spaces` table. You then have to "fix" the hosts and set them to equal or be subdomains of `APP_ROOT_HOST`. ``` -php artisan spaces:create-update my.sip myhost.com --super # You can set some Spaces as SuperSpaces, the admin will be able to manage the other spaces -php artisan spaces:create-update alpha.sip alpha.myhost.com -php artisan spaces:create-update beta.sip beta.myhost.com +php artisan spaces:create-update my.sip myhost.com "My Super Space" --super # You can set some Spaces as SuperSpaces, the admin will be able to manage the other spaces +php artisan spaces:create-update alpha.sip alpha.myhost.com "Alpha Space" +php artisan spaces:create-update beta.sip beta.myhost.com "Beta Space" ... ``` @@ -64,16 +64,33 @@ php artisan spaces:create-update beta.sip beta.myhost.com 7. (Optional) Import the old instance DotEnv environnement variables into a space. +⚠️ Be careful, during this import only the project DotEnv file variables will be imported, other environnement (eg. set in Apache, nginx or Docker) will be ignored. + +⚠️ The content of the `ACCOUNT_PROVISIONING_RC_FILE` will not be imported. You will have to extract the sections and lines that you want to use manually using the dedicated form or the API. + ``` php artisan spaces:import-configuration-from-dot-env {sip_domain} ``` -You can find more details regarding those steps in the [`INSTALL.md`](INSTALL.md) file. +You can find more details regarding those steps in the [`README.md`](README.md) file. ### Deprecated - **Last major version supporting the deprecated endpoints of the API** +## [1.6] - 2024-12-30 + +### Added + +- **Phone validation** Phone numbers are now strictly validated and countries can be enabled disabled to prevent spam +- **SIP Domains** Account SIP domains can now be managed from the UI and API +- **CoTURN Credential** Get CoTURN credentials from the API +- **RFC 8898 Support** + +### Migrate from [1.5] + +Nothing specific to do + ## [1.5] - 2024-08-29 ### Added diff --git a/flexiapi/.env.example b/flexiapi/.env.example index d4b64dc..5818d5c 100644 --- a/flexiapi/.env.example +++ b/flexiapi/.env.example @@ -1,4 +1,3 @@ -APP_NAME=FlexiAPI APP_ENV=local APP_KEY= APP_DEBUG=false diff --git a/flexiapi/config/app.php b/flexiapi/config/app.php index 0b7e682..77df630 100644 --- a/flexiapi/config/app.php +++ b/flexiapi/config/app.php @@ -13,7 +13,7 @@ return [ | */ - 'name' => env('APP_NAME', 'Account Manager'), + 'name' => env('APP_NAME', 'Flexisip Account Manager'), 'project_url' => env('APP_PROJECT_URL', ''), 'terms_of_use_url' => env('TERMS_OF_USE_URL', ''),