jetlinks-community Docker & Self-Hosted Deployment

GitHub

JetLinks 基于Java,Spring Boot ,WebFlux,Netty,Vert.x,Reactor等开发, 是一个全响应式的企业级物联网平台。支持统一物模型管理,多种设备,多种厂家,统一管理。统一设备连接管理,多协议适配(TCP,MQTT,UDP,CoAP,HTTP等),屏蔽网络编程复杂性,灵活接...

RAW Compose
1. Pull Image (DOCKERHUB) docker pull registry.cn-shenzhen.aliyuncs.com/jetlinks/jetlinks-community
2. Docker Run (1-Click Launch) docker run -d --name jetlinks-community -p 8848:8848 --restart always registry.cn-shenzhen.aliyuncs.com/jetlinks/jetlinks-community:2.11.0-SNAPSHOT
3. Podman Run podman run -d --name jetlinks-community -p 8848:8848 --restart always registry.cn-shenzhen.aliyuncs.com/jetlinks/jetlinks-community:2.11.0-SNAPSHOT
4. Skopeo Inspect (Zero-Pull Manifest) skopeo inspect docker://docker.io/registry.cn-shenzhen.aliyuncs.com/jetlinks/jetlinks-community:2.11.0-SNAPSHOT
5. ORAS Pull (OCI Artifact) oras pull registry.cn-shenzhen.aliyuncs.com/jetlinks/jetlinks-community:2.11.0-SNAPSHOT
6. Compose Deployment docker compose up -d
docker/run-all/docker-compose.yml
Download .yml
version: '3'
services:
    redis:
        image: redis:6
        container_name: jetlinks-ce-redis
        #    ports:
        #      - "6379:6379" # 仅供jetlinks-ce访问
        volumes:
            - "./data/redis:/data"
        command: redis-server --appendonly yes --requirepass "JetLinks@redis"
        environment:
            - TZ=Asia/Shanghai
        healthcheck:
            test: [ "CMD", "redis-cli", "-h", "localhost", "-p", "6379", "-a", "JetLinks@redis", "ping" ]
            interval: 10s
            timeout: 5s
            retries: 3
    postgres:
        image: timescale/timescaledb:latest-pg16
        container_name: jetlinks-ce-postgres
        #        ports:
        #            - "5432:5432"  # 仅供jetlinks-ce访问
        volumes:
            - "./data/postgres:/var/lib/postgresql/data"
        environment:
            POSTGRES_PASSWORD: JetLinks@postgres
            POSTGRES_DB: jetlinks
            POSTGRES_HOST_AUTH_METHOD: trust
            TZ: Asia/Shanghai
        healthcheck:
            test: [ "CMD", "pg_isready", "-U", "postgres" ]
            interval: 10s
            timeout: 5s
            retries: 5
    jetlinks:
        image: registry.cn-shenzhen.aliyuncs.com/jetlinks/jetlinks-community:2.11.0-SNAPSHOT
        container_name: jetlinks-ce
        ports:
            - "8848:8848" # 平台访问端口
            - "1883-1890:1883-1890" # 预留
            - "8800-8810:8800-8810" # 预留
            - "5060-5061:5060-5061" # 预留
        volumes:
            - "./data/jetlinks:/application/data"
        environment:
            - "JAVA_OPTS=-Duser.language=zh"
            - "TZ=Asia/Shanghai"
            - "EXTERNAL_HOST=local-host.cn" # 对外提供访问的域名或者ip地址
            - "EXTERNAL_PORT=8848" # 对外提供访问的端口,修改了端口映射同时也需要修改这里.
            - "ADMIN_USER_PASSWORD=JetLinks.C0mmVn1ty" # admin用户的初始密码
            - "spring.r2dbc.url=r2dbc:postgresql://postgres:5432/jetlinks" #数据库连接地址
            - "spring.r2dbc.username=postgres"
            - "spring.r2dbc.password=JetLinks@postgres"
            - "spring.data.redis.host=redis"
            - "spring.data.redis.port=6379"
            - "file.manager.storage-base-path=/application/data/files"
            - "spring.data.redis.password=JetLinks@redis"
            - "logging.level.io.r2dbc=warn"
            - "logging.level.org.springframework.data=warn"
            - "logging.level.org.springframework=warn"
            - "logging.level.org.jetlinks=warn"
            - "logging.level.org.hswebframework=warn"
            - "logging.level.org.springframework.data.r2dbc.connectionfactory=warn"
            - "network.resources[0]=0.0.0.0:8800-8810/tcp"
            - "network.resources[1]=0.0.0.0:1883-1890"
            - "hsweb.cors.enable=true"
            - "hsweb.cors.configs[0].path=/**"
            - "hsweb.cors.configs[0].allowed-credentials=true"
            - "hsweb.cors.configs[0].allowed-headers=*"
            - "hsweb.cors.configs[0].allowed-origins=*"
            - "hsweb.cors.configs[0].allowed-methods[0]=GET"
            - "hsweb.cors.configs[0].allowed-methods[1]=POST"
            - "hsweb.cors.configs[0].allowed-methods[2]=PUT"
            - "hsweb.cors.configs[0].allowed-methods[3]=PATCH"
            - "hsweb.cors.configs[0].allowed-methods[4]=DELETE"
            - "hsweb.cors.configs[0].allowed-methods[5]=OPTIONS"
        links:
            - redis:redis
            - postgres:postgres
        depends_on:
            postgres:
                condition: service_healthy
            redis:
                condition: service_healthy
#    ui:  # 如果通过访问内嵌的前端存在问题,可以使用这个镜像
#        image: registry.cn-shenzhen.aliyuncs.com/jetlinks/jetlinks-ui-vue:2.11.0
#        ports:
#            - "9000:9000"
#        environment:
#            API_BASE_PATH: "http://jetlinks:8848/"
#            TZ: Asia/Shanghai