在 CentOS 中安装 K3s 并与已安装的 Docker 集成
https://docs.k3s.io/zh/advanced
#使用 --docker 选项重新运行 K3s 安装脚本,以指定使用 Docker 作为容器运行时
curl -sfL https://get.k3s.io | INSTALL_K3S_EXEC="--docker" sh -
#
验证 Docker 与 K3s 集成:
kubectl get nodes https://docs.k3s.io/zh/advanced
#使用 --docker 选项重新运行 K3s 安装脚本,以指定使用 Docker 作为容器运行时
curl -sfL https://get.k3s.io | INSTALL_K3S_EXEC="--docker" sh -
#
验证 Docker 与 K3s 集成:
kubectl get nodes user: rootversion: "3"
services:
rocketchat:
image: registry.rocket.chat/rocketchat/rocket.chat:${RELEASE:-latest}
container_name: sys_chat
restart: always
volumes:
- ./uploads:/app/uploads
labels:
traefik.enable: "true"
traefik.http.routers.rocketchat.rule: Host(`${DOMAIN:-}`)
traefik.http.routers.rocketchat.tls: "true"
traefik.http.routers.rocketchat.entrypoints: https
traefik.http.routers.rocketchat.tls.certresolver: le
environment:
MONGO_URL: "${MONGO_URL:-\
mongodb://${MONGODB_ADVERTISED_HOSTNAME:-mongodb}:${MONGODB_INITIAL_PRIMARY_PORT_NUMBER:-27017}/\
${MONGODB_DATABASE:-rocketchat}?replicaSet=${MONGODB_REPLICA_SET_NAME:-rs0}}"
MONGO_OPLOG_URL: "${MONGO_OPLOG_URL:\
-mongodb://${MONGODB_ADVERTISED_HOSTNAME:-mongodb}:${MONGODB_INITIAL_PRIMARY_PORT_NUMBER:-27017}/\
local?replicaSet=${MONGODB_REPLICA_SET_NAME:-rs0}}"
ROOT_URL: ${ROOT_URL:-http://localhost:${HOST_PORT:-3000}}
PORT: ${PORT:-3000}
DEPLOY_METHOD: docker
DEPLOY_PLATFORM: ${DEPLOY_PLATFORM:-}
REG_TOKEN: ${REG_TOKEN:-}
depends_on:
- mongodb
expose:
- ${PORT:-3000}
ports:
- "${BIND_IP:-0.0.0.0}:${HOST_PORT:-3000}:${PORT:-3000}"
mongodb:
image: docker.io/bitnami/mongodb:${MONGODB_VERSION:-5.0}
container_name: sys_mongodb
restart: always
user: root
volumes:
- ./mongodb:/bitnami/mongodb
environment:
MONGODB_REPLICA_SET_MODE: primary
MONGODB_REPLICA_SET_NAME: ${MONGODB_REPLICA_SET_NAME:-rs0}
MONGODB_PORT_NUMBER: ${MONGODB_PORT_NUMBER:-27017}
MONGODB_INITIAL_PRIMARY_HOST: ${MONGODB_INITIAL_PRIMARY_HOST:-mongodb}
MONGODB_INITIAL_PRIMARY_PORT_NUMBER: ${MONGODB_INITIAL_PRIMARY_PORT_NUMBER:-27017}
MONGODB_ADVERTISED_HOSTNAME: ${MONGODB_ADVERTISED_HOSTNAME:-mongodb}
MONGODB_ENABLE_JOURNAL: ${MONGODB_ENABLE_JOURNAL:-true}
ALLOW_EMPTY_PASSWORD: ${ALLOW_EMPTY_PASSWORD:-yes}server {
server_name chat.wdzs.com;
include /common/wdzs.com.inc;
sendfile on;
keepalive_timeout 65;
client_max_body_size 10m;
# access_log on;
# access_log /var/log/nginx/srs.log main;
location / {
root /;
proxy_pass http://192.168.100.1:3000/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Nginx-Proxy true;
proxy_redirect off;
}
}
https://github.com/seaweedfs/seaweedfs/wiki/Client-Libraries
version: '3'
services:
seaweedfs:
container_name: sys_seaweedfs
image: chrislusf/seaweedfs
restart: always
networks:
- mynetwork
# ports:
# - "3002:9333"
# - "3003:8080"
volumes:
- ./data:/data
command: server
- "-dir=/data"
- "-filer=true"
networks:
mynetwork:
external: trueserver {
server_name oss.wdzs.cn;
sendfile on;
keepalive_timeout 65;
client_max_body_size 100m;
include /common/all_api.inc;
location / {
root /;
# proxy_pass http://192.168.100.1:3003/;
proxy_pass http://seaweedfs:8080/;
limit_except GET {
deny all;
}
}
location /upload/ {
root /;
# proxy_pass http://192.168.100.1:3002/;
proxy_pass http://seaweedfs:9333/;
proxy_http_version 1.1;
proxy_set_header Host $http_host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Proxy "";
proxy_buffering on; # GET buffering or “X-Accel-Buffering” enables or disables buffering of a response;
proxy_buffers 64 1m; # buffers used for reading a response from the proxied server, for a single connection
proxy_buffer_size 8k; # maximum size of the data that nginx can receive from the server at a time is set
proxy_busy_buffers_size 2m;
proxy_request_buffering on; # PUT buffering
proxy_next_upstream error timeout non_idempotent http_500; # PUT request should be passed to the next server:
proxy_connect_timeout 200ms;
proxy_read_timeout 3s; #timeout is set only between two successive read operations
proxy_send_timeout 3s; #timeout is set only between two successive write operations
}
}curl -F "file=@711561.jpg" http://oss.wdzs.cn/upload/submitcurl -X DELETE http://oss.wdzs.cn/4/0947f807b5/711561.jpghttp://oss.wdzs.cn/4/0947f807b5/711561.jpg?width=800
https://www.minio.org.cn/docs/minio/linux/index.html
docker run --name minio -d \
--publish 19000:9000 \
--publish 19001:9001 \
-e "MINIO_ACCESS_KEY=admin" \
-e "MINIO_SECRET_KEY=admin123456" \
--volume /data/minio:/bitnami/minio/data \
--restart=always \
--network mynetwork \
bitnami/minio:latest excel文件:表分区创建.xlsx
#删除旧索引 并重命名
ALTER TABLE xdata_klines_5m DROP CONSTRAINT pk_okx_candles_1m;
ALTER TABLE xdata_klines_5m RENAME TO xdata_klines_5m_00;
create table xdata_klines_5m (
b_id INT2 not null default 0,
t_uid INT8 not null default 0,
o DECIMAL(20,10) null default 0.00,
h DECIMAL(20,10) null default 0.00,
l DECIMAL(20,10) null default 0.00,
c DECIMAL(20,10) null default 0.00,
vol DECIMAL(20,2) null default 0.00,
vol_b DECIMAL(20,2) null default 0.00,
vol_u DECIMAL(20,2) null default 0.00,
ts TIMESTAMP null,
constraint PK_OKX_KLINES_5M primary key (b_id, t_uid)
) partition by range (t_uid);
ALTER TABLE xdata_klines_5m ATTACH PARTITION xdata_klines_5m_00 FOR VALUES FROM (MINVALUE) TO (8418861);
create table xdata_klines_5m_04 partition of xdata_klines_5m FOR VALUES FROM (8500321) TO (8629921);
create table xdata_klines_5m_05 partition of xdata_klines_5m FOR VALUES FROM (8500321) TO (8629921);
create table xdata_klines_5m_06 partition of xdata_klines_5m FOR VALUES FROM (8500321) TO (8629921);ALTER TABLE xdata_klines_5m ATTACH PARTITION xdata_klines_5m_01 FOR VALUES FROM (MINVALUE) TO (8241121);
ALTER TABLE xdata_klines_5m ATTACH PARTITION xdata_klines_5m_02 FOR VALUES FROM (8241121) TO (8500321);
ALTER TABLE xdata_klines_5m ATTACH PARTITION xdata_klines_5m_03 FOR VALUES FROM (8500321) TO (8629921);ALTER TABLE xdata_klines_5m DETACH PARTITION xdata_klines_5m_02;
ALTER TABLE xdata_klines_5m DETACH PARTITION xdata_klines_5m_03;