Skip to main content

Software Compose (docker-compose)

Database Typed

Clickhouse

vim /opt/clickhouse/docker-compose.yml
version: '3.8'

services:
clickhouse-server:
image: clickhouse/clickhouse-server
container_name: clickhouse-server
ports:
- "8123:8123"
- "19000:9000"
volumes:
- ./ch_data:/var/lib/clickhouse
- ./ch_logs:/var/log/clickhouse-server
environment:
CLICKHOUSE_DB: my_database
CLICKHOUSE_USER: root
CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT: 1
CLICKHOUSE_PASSWORD: root
ulimits:
nofile:
soft: 262144
hard: 262144
restart: unless-stopped

verify:

echo 'SELECT version()' | curl 'http://localhost:8123/' --data-binary @-

K/V Typed

Message Typed

Kafka compose

---
version: '2'
services:
kafka:
container_name: kafka
image: docker.mirrors.sjtug.sjtu.edu.cn/wurstmeister/kafka:latest
ports:
- 9092:9092
depends_on:
- zookeeper
environment:
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_ADVERTISED_HOST_NAME: 192.168.50.252
KAFKA_ADVERTISED_PORT: 9092
volumes:
- /etc/localtime:/etc/localtime

zookeeper:
image: docker.mirrors.sjtug.sjtu.edu.cn/wurstmeister/zookeeper:latest
hostname: zookeeper
container_name: zookeeper
ports:
- "2181:2181"

MicroService Infrastructure Typed

Grafana

services:
grafana:
image: docker.io/grafana/grafana-enterprise
container_name: grafana
restart: unless-stopped
# if you are running as root then set it to 0
# else find the right id with the id -u command
user: '0'
ports:
- '3300:3000'
# adding the mount volume point which we create earlier
volumes:
- '$PWD/data:/var/lib/grafana'
extra_hosts:
- 'host.log.server:100.65.22.8'

Untags

Tabby

version: '3'
services:
tabby:
image: ghcr.io/eugeny/tabby-web
container_name: tabby-sync
restart: always
ports:
- '10490:8000'
volumes:
- ./data:/app-dist
environment:
- DATABASE_URL=sqlite:////app-dist/db.sqlite3
- PORT=8000
- DEBUG=False
- SOCIAL_AUTH_GITHUB_KEY={your_key}
- SOCIAL_AUTH_GITHUB_SECRET={your_sk}

next step:

docker exec -it tabby-sync /bin/sh

# https://www.npmjs.com/package/tabby-web-container?activeTab=versions
./manage.sh add_version 1.0.163