跳至主要内容

Docker-Compose 安装 ClickHouse

 version: '3'

services:

clickhouse-server:

restart: always

image: yandex/clickhouse-server

container_name: clickhouse-server

ulimits:

nofile:

soft: 262144

hard: 262144

ports:

- 8123:8123

- 9000:9000

- 9009:9009

volumes:

- ./data:/var/lib/clickhouse

- ./config.xml:/etc/clickhouse-server/config.xml

- ./users.xml:/etc/clickhouse-server/users.xml

- ./log:/var/log/clickhouse-server

networks:

- net_db

healthcheck:

test: wget --no-verbose --tries=1 --spider localhost:8123/ping || exit 1

interval: 2s

timeout: 2s

retries: 16

#clickhouse-client:

# restart: always

# image: yandex/clickhouse-client

# container_name: clickhouse-client

# command: ['--host', 'clickhouse-server', '--query', 'select * from system.functions order by name limit 4']

# networks:

# - net_db

# depends_on:

# clickhouse-server:

# condition: service_healthy

networks:

net_db:

external: true

--------------------------------------------------

先拷贝出来: docker cp clickhouse-server:/etc/clickhouse-server/config.xml /docker/clickhouse/config.xml

再放开yaml里:#- ./config.xml:/etc/clickhouse-server/config.xml

先拷贝出来: docker cp clickhouse-server:/etc/clickhouse-server/users.xml /docker/clickhouse/users.xml

再放开yaml里:#- ./users.xml:/etc/clickhouse-server/users.xml

config.xml 放开ip地址:<listen_host>0.0.0.0</listen_host>

users.xml 设置密码:<password>qh123</password>

评论

此博客中的热门博文

Docker-Compose 安装 PolarDB

 version: '3.1' services:   polardb:     container_name: polardb     restart: always     image: polardb/polardb_pg_local_instance     ports:       - 5432:5432     networks:       - net_db     environment:       TZ: Asia/Shanghai     volumes:       - ./polardb:/var/polardb networks:   net_db:     external: true

OpenAI 开源的Whisper体验

近期有一个需求,类似于数字人,用户用语音控制进行菜单跳转,甚至于进行分析。 当用户对着麦克风进行说话的时候,要解析出来用户想干什么。当然好多付费的接口可以实现,但基于互联网免费的思路,当然要查找一翻。 Whisper 是用于自动语音识别 (ASR) 和语音翻译的预训练模型。 Whisper 模型经过 68 万小时的标记数据训练,表现出强大的泛化能力,无需进行微调即可推广到许多数据集和领域。 写的很强大,HuggingFace上有搭建好的模型当然要试用一下了,效果还不错,中文的解析正确率也挺高的,下面是接口请求方式。

Wireguard 部署应用

 一、首先要有一个公网IP来进行服务端安装配置,为了简化部署,并且尽量少的侵入性,就用Docker安装服务端: services:   wireguard:     restart: always     image: weejewel/wg-easy     container_name: wireguard     ports:       - "51820:51820/udp"       - "51821:51821/tcp"     environment:       - TZ=Asia/Shanghai       - WG_HOST=0.0.0.0       - PASSWORD=123456       - WG_PERSISTENT_KEEPALIVE=25       - WG_DEFAULT_ADDRESS=10.0.8.x       - WG_DEFAULT_DNS=114.114.114.114       - WG_ALLOWED_IPS=10.0.8.0/24     volumes:       - ./wg-easy:/etc/wireguard     cap_add:       - NET_ADMIN       - SYS_MODULE     sysctls:       - net.ipv4.ip_forward=1       - net.ipv4.conf.all.src_valid_mark=1 二、客户端安装: # root权限 sudo -i # 安装wireguard软件 apt install w...