administrators

Private

Posts

  • Kuchen :)

    IMG-20250606-WA0002.jpg

    Friesentorte und Apfelstrudel

  • Neulich in der Ramen Bar

    IMG-20250606-WA0001.jpg

    leckeres Japan. Curry und hausgemachte Limonade

    Mannheim Innenstadt

  • Nodebb Healthcheck

    Hi,

    first we need the check in nodebb/.docker/config

    vi healtcheck.js

    const http = require('http');
    const options = {
        host: '127.0.0.1',
        port: 4567,
        timeout: 2000
    };
    
    const healthCheck = http.request(options, (res) => {
        console.log(`HEALTHCHECK STATUS: ${res.statusCode}`);
        if (res.statusCode == 200) {
            process.exit(0);
        }
        else {
            process.exit(1);
        }
    });
    
    healthCheck.on('error', function (err) {
        console.error('ERROR');
        process.exit(1);
    });
    
    healthCheck.end();
    

    Then we can add the check in our yml File

        healthcheck:
          test: ["CMD", "node", "/opt/config/healthcheck.js"]
          interval: 5s
          timeout: 3s
          retries: 5
          start_period: 15s
    

    To check if everything is Working we can watch docker ps, it should be healthy there or use docker inspeckt

    docker inspect --format='{{json .State.Health}}' <container-id>
    

    Greetings

  • Einige übertreiben es.
  • Also visit my YouTube Channel
  • It Support for free!

    Willkommen beim IT-Support! Wir sind hier, um Ihnen bei allen technischen Fragen und Problemen schnell und zuverlässig zu helfen. Egal, ob Sie Unterstützung bei Software, Hardware oder Netzwerken benötigen – unser Team steht Ihnen mit Rat und Tat zur Seite. Zögern Sie nicht, uns zu kontaktieren – wir sorgen dafür, dass Ihre IT reibungslos läuft!

    Welcome to our IT Support! We are here to assist you with all your technical questions and issues quickly and reliably. Whether you need help with software, hardware, or networks – our team is ready to support you. Don't hesitate to contact us – we ensure your IT runs smoothly!

  • Uptime Kuma compose yml File

    Here I want to share my yml File, because there are very few on the Internet.

    version: '3.3'
    
    services:
      uptime-kuma:
        image: louislam/uptime-kuma:1
        container_name: uptime-kuma
        volumes:
          - ./uptime-kuma-data:/app/data
          - /var/run/docker.sock:/var/run/docker.sock
        ports:
          - 3001:3001  # <Host Port>:<Container Port>
        restart: always
        healthcheck:
          test: ["CMD", "curl", "-f", "http://localhost:3001"]
          interval: 5s
          timeout: 3s
          retries: 5
          start_period: 10s
    
  • RE: NodeBB Run in Docker
  • NodeBB Run in Docker

    At first you need to clone the reposetory:

    git clone https://github.com/NodeBB/NodeBB.git
    

    Go to NodeBB and chmod and chown the Docker dir.

    chown -R 1001:1001 .docker
    chmod -R 755 .docker
    

    Start Building Nodebb with:

    docker compose --profile mongo up -d
    

    you can also use redis or postgres as Database.

    Greetings

  • Unifi Controller Docker with external MongoDB container

    Here I describe how you connect the Unifi Controller to external Database.

    At first you need the MongoDB Container.

    create docker-compose.yml in folder mongodb where you want it:

    services:
      mongo:
        image: 'mongo:4.4'
        restart: unless-stopped
        ports:
          - '27017:27017'
        environment:
          MONGO_INITDB_ROOT_USERNAME: test
          MONGO_INITDB_ROOT_PASSWORD: password
          MONGO_INITDB_DATABASE: test
        volumes:
          - mongo-data:/data/db
    
    volumes:
      mongo-data:
    

    Then you need to create User for Unifi Controller like this:

    use unifi
    db.createUser(
      {
        user: "unifi",
        pwd: "password",  // or cleartext password
        roles: [
           { role: "readWrite", db:"admin" } ,
           { role: "readWrite", db:"unifi" } ,
           { role: "readWrite", db:"unifi_stat" }
        ]
      }
    )
    
    

    Now we can another folder called unifi and also create the docker-compose.yml

    version: '2.3'
    services:
      controller:
        image: "jacobalberty/unifi:latest"
        container_name: unifi_controller
        init: true
        restart: always
        volumes:
          - dir:/unifi
          - data:/unifi/data
          - log:/unifi/log
          - cert:/unifi/cert
          - init:/unifi/init.d
          - run:/var/run/unifi
          # Mount local folder for backups and autobackups
          - ./backup:/unifi/data/backup
        user: unifi
        sysctls:
          net.ipv4.ip_unprivileged_port_start: 0
        environment:
          # DB_URI: mongodb://mongo/unifi
          #STATDB_URI: mongodb://mongo/unifi_stat
          DB_URI: mongodb://unifi:password@89.58.43.67:27017/unifi?authSource=unifi
          STATDB_URI: mongodb://unifi:password@89.58.43.67:27017/unifi_stat?authSource=unifi
          DB_NAME: unifi
        ports:
          - "3478:3478/udp" # STUN
          - "5514:5514/tcp" # Remote Logging 
          - "6789:6789/tcp" # Speed test
          - "8080:8080/tcp" # Device/ controller comm.
          - "8443:8443/tcp" # Controller GUI/API as seen in a web browser
          - "8880:8880/tcp" # HTTP portal redirection
          - "8843:8843/tcp" # HTTPS portal redirection
          - "10001:10001/udp" # AP discovery
      logs:
        image: bash
        container_name: unifi_logs
        depends_on:
          - controller
        command: bash -c 'tail -F /unifi/log/*.log'
        restart: always
        volumes:
          - log:/unifi/log
    
    volumes:
      data:
      log:
      cert:
      init:
      dir:
      run:
    

Member List