Execution as Container

Info
The following works with all OCI-compliant runtimes such as Podman.
Prerequisites
Docker (and Docker Compose) installed.

With Compose

Recommended

  1. Create a compose.yaml file and insert the following content. Alternatively, you can download the file below.

    services:
      collectu:
        image: ghcr.io/core4x/collectu-core:latest  # or collectu/collectu-core:latest -> pull from docker hub.
        container_name: collectu-core
        restart: unless-stopped  # always
    
        deploy:
          resources:
            # limits:
              # cpus: "1.0"
              # memory: 2G
            reservations:
              cpus: "0.5"
              memory: 1G
    
        healthcheck:
          test: ["CMD-SHELL", "curl -sf http://localhost:8181/healthz || ps -o comm= 1 | grep python || exit 1"]
          interval: 30s
          timeout: 5s
          retries: 3
    
        # 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.
          - MCP=0  # Enable the MCP server - the API has to be enabled.
          - 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. Create an api access token. Download the created token and save it in the same directory as your compose file. Otherwise, comment the according line in the compose file.

  3. If you have subscribed to a plan, download your personal git access token and place the file in the same directory as your compose file. Otherwise, comment the according line in the compose file.

  4. Open a command line interface (e.g. Git Bash) and execute:

    docker compose up

  5. Continue with our First Steps.

With Container Runtime

  1. Execute (replace the token with your personal api access token):

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

    Alternatively, you can place your personal api access token in the same directory, where you execute the command.

    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. If you have subscribed to a plan, download your personal git access token and place the file in the same directory, where you execute the command.

    The command should now look like this:

    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. Continue with our First Steps.
Info
You can also specify additional environment variables in the same way as the HUB_API_ACCESS_TOKEN.
Previous
Python
Next
Saas