Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/npm_and_yarn/multi-9423f4c335
Browse files Browse the repository at this point in the history
  • Loading branch information
andrey18106 authored Sep 23, 2024
2 parents d2f221f + f25902e commit 8f23c8d
Show file tree
Hide file tree
Showing 11 changed files with 180 additions and 8 deletions.
2 changes: 1 addition & 1 deletion docs/Installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ where ``<version-tag>`` is the version you want to install.
To install it in development mode, follow the instructions on this page: :ref:`dev-setup`.

4. Setup Deploy daemon
----------------------
**********************

Upon the successful installation of the AppAPI, a one-time configuration is essential.
Details on this configuration can be found in the subsequent section: :ref:`create-deploy-daemon`.
Expand Down
161 changes: 161 additions & 0 deletions docs/faq/BehindCompanyProxy.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
Corporate Proxy - Permanent Settings for PHP CLI
================================================

If you're using our application within a corporate network that requires proxy settings, you might encounter issues when running PHP CLI commands that attempt to access the internet.

To resolve this, you need to configure permanent proxy settings for the PHP CLI environment.

Symptoms
--------

When running the command:

.. code-block:: bash
php occ app_api:app:register --force-scopes test-deploy docker_socket_proxy --info-xml https://raw.githubusercontent.com/cloud-py-api/test-deploy/main/appinfo/info.xml --test-deploy-mode --no-ansi --no-warnings
You may receive an error similar to:

.. code-block:: text
file_get_contents(https://raw.githubusercontent.com/cloud-py-api/test-deploy/main/appinfo/info.xml): Failed to open stream: Connection timed out at /var/www/html/custom_apps/app_api/lib/Service/ExAppService.php#277
Cause
-----

This issue occurs because the PHP CLI environment does not have the proxy settings configured, unlike the web PHP environment which may already be using proxy settings specified in your web server configuration.

Permanent Solution
------------------

To permanently configure proxy settings for PHP CLI, you can either modify the PHP CLI `php.ini` file or set environment variables system-wide.

Method 1: Edit PHP CLI `php.ini` File
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

1. **Locate the PHP CLI `php.ini` File**

Run the following command to find the loaded configuration file for PHP CLI:

.. code-block:: bash
php --ini
Look for the line:

.. code-block:: text
Loaded Configuration File: /path/to/php.ini
2. **Edit the `php.ini` File**

Open the `php.ini` file in a text editor with appropriate permissions:

.. code-block:: bash
sudo nano /path/to/php.ini
3. **Add Proxy Settings**

Add the following lines to configure the proxy settings:

.. code-block:: ini
[HTTP]
; Proxy settings for HTTP
http.proxy_host = "proxy.example.com"
http.proxy_port = 8080
http.proxy_user = "username"
http.proxy_password = "password"
[HTTPS]
; Proxy settings for HTTPS
https.proxy_host = "proxy.example.com"
https.proxy_port = 8080
https.proxy_user = "username"
https.proxy_password = "password"
Replace the placeholders with your actual proxy server details:

- `proxy.example.com`: Your proxy server address.
- `8080`: Your proxy server port.
- `username`: Your proxy username (if required).
- `password`: Your proxy password (if required).

4. **Save and Close the File**

Save the changes and exit the text editor.

5. **Verify the Configuration**

Run the PHP CLI command again:

.. code-block:: bash
php occ app_api:app:register
It should now be able to access the internet through the proxy.

**Note:** Not all PHP functions respect the proxy settings in `php.ini`. If issues persist, consider using system-wide environment variables.

Method 2: Set System-Wide Environment Variables
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

1. **Edit Shell Profile**

For a permanent solution, add the proxy settings to the system-wide environment variables. Open the `/etc/environment` file:

.. code-block:: bash
sudo nano /etc/environment

2. **Add Proxy Environment Variables**

Add the following lines to the file:

.. code-block:: bash
http_proxy="http://proxy.example.com:8080"
https_proxy="http://proxy.example.com:8080"

# If your proxy requires authentication:
http_proxy="http://username:[email protected]:8080"
https_proxy="http://username:[email protected]:8080"

Replace the placeholders with your actual proxy details.

3. **Apply the Changes**

Log out and log back in, or reboot the system to apply the changes.

4. **Verify the Configuration**

Run the command again:

.. code-block:: bash
php occ app_api:app:register --force-scopes test-deploy docker_socket_proxy --info-xml https://raw.githubusercontent.com/cloud-py-api/test-deploy/main/appinfo/info.xml --test-deploy-mode --no-ansi --no-warnings

It should now work without connectivity issues.

**Note:** This method sets the proxy settings for all users and applications on the system.

Troubleshooting
---------------

- **Incorrect Proxy Details**

Ensure all proxy details are correct. Incorrect hostnames, ports, or credentials will prevent connectivity.

- **Environment Variables Not Loaded**

Make sure the environment variables are correctly loaded. A system reboot or re-login may be necessary.

- **Firewall Restrictions**

Verify with your network administrator that your system is allowed to access the internet through the proxy.

Contact Support
---------------

If you've followed these steps and still experience issues, please contact our support team for further assistance.
3 changes: 2 additions & 1 deletion docs/faq/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ or provide a brief answer.

This section will be updated with time, as new questions arise.
If you have a question that is not listed here or the answer is not enough for you, please feel free to
ask it by creating an issue in the `AppAPI repository <https://github.com/cloud-py-api/app_api/issues>`_.
ask it by creating an issue in the `AppAPI repository <https://github.com/nextcloud/app_api/issues>`_.


.. toctree::
Expand All @@ -20,4 +20,5 @@ or provide a brief answer.
DockerSocketProxy
GpuSupport
Scaling
BehindCompanyProxy
Troubleshooting
2 changes: 1 addition & 1 deletion l10n/ast.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ OC.L10N.register(
"Nextcloud AppAPI" : "AppAPI de Nextcloud",
"The AppAPI Project is an exciting initiative that aims to revolutionize the way applications are developed for Nextcloud." : "El proyeutu AppAPI ye una iniciativa emocionante que tien l'oxetivu de revolucionar la forma na que se desendolquen les aplicaciones pa Nextcloud.",
"External Apps management" : "Xestión d'aplicaciones esternes",
"Update to {version}" : "Anovar a la versión {versión}",
"Update to {version}" : "Anovar a la versión {version}",
"Remove" : "Quitar",
"This app cannot be installed because the following dependencies are not fulfilled:" : "Esta aplicación nun se pue instalar porque nun se cumplen les dependencies siguientes:",
"View in store" : "Ver na tienda",
Expand Down
2 changes: 1 addition & 1 deletion l10n/ast.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"Nextcloud AppAPI" : "AppAPI de Nextcloud",
"The AppAPI Project is an exciting initiative that aims to revolutionize the way applications are developed for Nextcloud." : "El proyeutu AppAPI ye una iniciativa emocionante que tien l'oxetivu de revolucionar la forma na que se desendolquen les aplicaciones pa Nextcloud.",
"External Apps management" : "Xestión d'aplicaciones esternes",
"Update to {version}" : "Anovar a la versión {versión}",
"Update to {version}" : "Anovar a la versión {version}",
"Remove" : "Quitar",
"This app cannot be installed because the following dependencies are not fulfilled:" : "Esta aplicación nun se pue instalar porque nun se cumplen les dependencies siguientes:",
"View in store" : "Ver na tienda",
Expand Down
5 changes: 3 additions & 2 deletions l10n/lv.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,19 @@ OC.L10N.register(
"Developer documentation" : "Izstrādātāja dokumentācija",
"Update to {update}" : "Atjaunināt uz {update}",
"Icon" : "Ikona",
"Name" : "Vārds",
"Name" : "Nosaukums",
"Version" : "Versija",
"Level" : "Līmenis",
"Actions" : "Darbības",
"_Update_::_Update all_" : ["Atjaunināt visas","Atjaunināt","Atjaunināt visas"],
"Type" : "Veids",
"Display Name" : "Ekrāna vārds",
"Display Name" : "Attēlojamais vārds",
"Delete" : "Dzēst",
"Edit" : "Labot",
"Host" : "Resursdators",
"More info" : "Vairāk informācijas",
"Enabled" : "Iespējots",
"Display name" : "Attēlojamais vārds",
"Network" : "Tīkls",
"Confirm" : "Apstiprināt",
"Save" : "Saglabāt",
Expand Down
5 changes: 3 additions & 2 deletions l10n/lv.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,19 @@
"Developer documentation" : "Izstrādātāja dokumentācija",
"Update to {update}" : "Atjaunināt uz {update}",
"Icon" : "Ikona",
"Name" : "Vārds",
"Name" : "Nosaukums",
"Version" : "Versija",
"Level" : "Līmenis",
"Actions" : "Darbības",
"_Update_::_Update all_" : ["Atjaunināt visas","Atjaunināt","Atjaunināt visas"],
"Type" : "Veids",
"Display Name" : "Ekrāna vārds",
"Display Name" : "Attēlojamais vārds",
"Delete" : "Dzēst",
"Edit" : "Labot",
"Host" : "Resursdators",
"More info" : "Vairāk informācijas",
"Enabled" : "Iespējots",
"Display name" : "Attēlojamais vārds",
"Network" : "Tīkls",
"Confirm" : "Apstiprināt",
"Save" : "Saglabāt",
Expand Down
3 changes: 3 additions & 0 deletions l10n/nl.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,12 @@ OC.L10N.register(
"Display Name" : "Weergavenaam",
"Cancel" : "Annuleren",
"Delete" : "Verwijder",
"Default" : "Standaard",
"Set as default" : "Zet as standaard",
"Edit" : "Bewerken",
"Host" : "Host",
"Nextcloud URL" : "Nextcloud URL",
"More info" : "Meer info",
"Enabled" : "Ingeschakeld",
"Network" : "Netwerk",
"Confirm" : "Bevestigen",
Expand Down
3 changes: 3 additions & 0 deletions l10n/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,12 @@
"Display Name" : "Weergavenaam",
"Cancel" : "Annuleren",
"Delete" : "Verwijder",
"Default" : "Standaard",
"Set as default" : "Zet as standaard",
"Edit" : "Bewerken",
"Host" : "Host",
"Nextcloud URL" : "Nextcloud URL",
"More info" : "Meer info",
"Enabled" : "Ingeschakeld",
"Network" : "Netwerk",
"Confirm" : "Bevestigen",
Expand Down
1 change: 1 addition & 0 deletions l10n/zh_CN.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ OC.L10N.register(
"AppAPI ExApp notifier" : "AppAPI 外部程序通知",
"AppAPI" : "AppAPI",
"Nextcloud AppAPI" : "Nextcloud AppAPI",
"The AppAPI Project is an exciting initiative that aims to revolutionize the way applications are developed for Nextcloud." : "AppAPI 项目是一项令人兴奋的计划,旨在彻底改变为 Nextcloud 开发应用程序的方式。",
"Update to {version}" : "更新至 {version}",
"Remove" : "移除",
"This app has no minimum Nextcloud version assigned. This will be an error in the future." : "该应用没有指定支持的 Nextcloud 最低版本。可能会在将来出现问题。",
Expand Down
1 change: 1 addition & 0 deletions l10n/zh_CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"AppAPI ExApp notifier" : "AppAPI 外部程序通知",
"AppAPI" : "AppAPI",
"Nextcloud AppAPI" : "Nextcloud AppAPI",
"The AppAPI Project is an exciting initiative that aims to revolutionize the way applications are developed for Nextcloud." : "AppAPI 项目是一项令人兴奋的计划,旨在彻底改变为 Nextcloud 开发应用程序的方式。",
"Update to {version}" : "更新至 {version}",
"Remove" : "移除",
"This app has no minimum Nextcloud version assigned. This will be an error in the future." : "该应用没有指定支持的 Nextcloud 最低版本。可能会在将来出现问题。",
Expand Down

0 comments on commit 8f23c8d

Please sign in to comment.