Ausführung mit Docker

Voraussetzungen
Docker (und Docker Compose) installiert.

Mit Docker Compose

Empfohlen

  1. Erstellen Sie eine docker-compose.yml Datei und fügen Sie den folgenden Inhalt ein. Alternativ können Sie die Datei auch unten herunterladen.

    services:
      collectu:
        image: ghcr.io/core4x/collectu-core:latest  # or collectu/collectu-core:latest
        container_name: collectu-core
        restart: always
        # security_opt:
          # - seccomp=unconfined  # Required on RevPis
        environment:  # Overwrites the settings.ini variables.
          - APP_DESCRIPTION=My Machine  # The description of the app.
          - CONFIG=configuration.yml  # The filepath to the configuration file.
          - AUTO_START=1  # Load configuration file on start-up.
          - AUTO_INSTALL=1  # Automatically install third party requirements.
          - INITIAL_DOWNLOAD=1  # Automatically download modules from hub during first start.
          - AUTO_DOWNLOAD=1  # Automatically download modules if they do not exist locally.
          - API=1  # Start the api.
          - API_HOST=0.0.0.0  # Host address of the api.
          - API_PORT=8181  # Port of the api.
          - API_AUTHENTICATION=1  # Is authentication required for the local api and frontend.
          - FRONTEND=1  # Start the frontend.
          - FRONTEND_HOST=0.0.0.0  # Host address of the frontend.
          - FRONTEND_PORT=80  # Port of the frontend.
          - MOTHERSHIPS=[]  # The host addresses of the motherships to report to.
          # - HUB_API_ACCESS_TOKEN=<token>  # The api access token of the hub profile collectu.de.
          - REPORT_TO_HUB=1  # Shall this app report and receive tasks from the hub collectu.de.
          - SEND_USAGE_STATISTICS=1  # Send usage statistics.
          - GIT_DISCOVERY_ACROSS_FILESYSTEM=1  # Required by third party package (GitPython) to access the local repository.
        ports:
          - "8181:8181" # API - External = Internal!
          - "80:80" # FRONTEND
          # - "8123:8123" # REST Endpoint (Input module)
          # - "9999:9999" # TCP Server (Input module)
        volumes:
          - './configuration:/collectu-core/configuration'
          - './logs:/collectu-core/logs'
          - './data:/collectu-core/data'
          - './modules/inputs:/collectu-core/src/modules/inputs'
          - './modules/outputs:/collectu-core/src/modules/outputs'
          - './modules/processors:/collectu-core/src/modules/processors'
          - './git_access_token.txt:/collectu-core/git_access_token.txt'  # Delete this, if not used.
          - './api_access_token.txt:/collectu-core/api_access_token.txt'  # Delete this, if specified as env var.
                    
  2. Erstelle ein api access token. Laden Sie das erstellte Token herunter und speichern Sie es im gleichen Verzeichnis wie Ihre Docker-Compose-Datei. Ansonsten kommentieren Sie die entsprechende Zeile in der Docker-Compose-Datei aus.

  3. Wenn Sie ein Abonnement abgeschlossen haben, laden Sie Ihren persönlichen git access token und speichern Sie es im gleichen Verzeichnis wie Ihre Docker-Compose-Datei. Ansonsten kommentieren Sie die entsprechende Zeile in der Docker-Compose-Datei aus.

  4. Öffnen Sie eine Kommandozeile (z.B. Git Bash) und führen Sie folgenden Befehl aus:

    docker compose up

  5. Starte mit Erste Schritte.

Mit Docker

  1. FÜhren Sie Folgendes aus (ersetzen Sie das Token mit Ihrem persönlichen API-Zugriffstoken):

    docker run -e HUB_API_ACCESS_TOKEN=<token> -p 8181:8181 -p 80:80 --name collectu-core ghcr.io/core4x/collectu-core

    Alternativ können Sie Ihr persönliches API-Zugriffstoken in den gleichen Ordner einfügen, in dem Sie den Befehl ausführen.

    docker run -p 8181:8181 -p 80:80 --name collectu-core -v ./api_access_token.txt:/collectu-core/api_access_token.txt ghcr.io/core4x/collectu-core

  2. Wenn Sie ein Abonnement abgeschlossen haben, laden Sie Ihren persönlichen Git-Zugriffstoken und fügen Sie die Datei in den gleichen Ordner ein, in dem Sie den Befehl ausführen.

    Der Befehl sollte nun wie folgt aussehen:

    docker run -e HUB_API_ACCESS_TOKEN=<token> -p 8181:8181 -p 80:80 --name collectu-core -v ./git_access_token.txt:/collectu-core/git_access_token.txt ghcr.io/core4x/collectu-core

  3. Starte mit Erste Schritte.
Info
Sie können auch zusätzliche Umgebungsvariablen spezifizieren auf die gleiche Art und Weise wie HUB_API_ACCESS_TOKEN.
Zurück
Python
Weiter
Android