Proxy

Im Folgenden wird erklärt, wie der Collectu Core hinter einem Proxy ausgeführt wird.


Linux

Allgemeine Proxyeinstellungen festlegen:

sudo tee /etc/apt/apt.conf.d/proxy.conf > /dev/null <<EOF Acquire { HTTP::proxy "http://<proxy-host>:<port>/"; HTTPS::proxy "http://<proxy-host>:<port>/"; } EOF


Docker

Docker so konfigurieren, dass es den Proxy verwendet:

sudo mkdir -p /etc/systemd/system/docker.service.d sudo tee /etc/systemd/system/docker.service.d/proxy.conf > /dev/null <<EOF [Service] Environment="HTTP_PROXY=http://<proxy-host>:<port>/" Environment="HTTPS_PROXY=http://<proxy-host>:<port>/" Environment="NO_PROXY=localhost,127.0.0.1,::1" EOF

Docker neu starten:

sudo systemctl daemon-reload sudo systemctl restart docker

Proxy-Umgebungsvariablen zur docker-compose-Datei hinzufügen:

environment: - HTTP_PROXY=http://<proxy-host>:<port>/ - HTTPS_PROXY=http://<proxy-host>:<port>/ - NO_PROXY=localhost,127.0.0.1,::1


Windows / Python

Das Repository mit Proxyeinstellungen klonen:

git clone --config http.proxy=http://<proxy-host>:<port>/ https://github.com/core4x/collectu-core.git

SSL-Fehler für pip bei Bedarf beheben:

pip config set global.trusted-host "pypi.org files.pythonhosted.org pypi.python.org" \ --trusted-host=pypi.python.org \ --trusted-host=pypi.org \ --trusted-host=files.pythonhosted.org

Python-Abhängigkeiten hinter einem Proxy installieren:

pip install --proxy http://<proxy-host>:<port>/ -r requirements.txt