-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
60 changed files
with
1,936 additions
and
1,391 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,9 +32,9 @@ Using following steps: | |
Copy each node data to your desire path of server: | ||
|
||
```bash | ||
scp -r ready/ch01 [email protected]:/root/ | ||
scp -r ready/ch02 [email protected]:/root/ | ||
scp -r ready/ch03 [email protected]:/root/ | ||
scp -r ready/ch1 [email protected]:/root/ | ||
scp -r ready/ch2 [email protected]:/root/ | ||
scp -r ready/ch3 [email protected]:/root/ | ||
``` | ||
|
||
## Running clickhouse nodes | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
106 changes: 106 additions & 0 deletions
106
clickhouse-cluster/template/mangement/docker-compose.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
version: "3" | ||
|
||
services: | ||
# backend | ||
analytic-backend: | ||
image: ghcr.io/aasaam/analytic-backend:latest | ||
depends_on: | ||
- analytic-redis | ||
- analytic-rest-captcha | ||
- analytic-postgres | ||
container_name: analytic-backend | ||
volumes: | ||
- ./cert/ca.pem:/app/api/clickhouse-cert/ca.pem:ro | ||
- ./cert/client-fullchain.pem:/app/api/clickhouse-cert/client-fullchain.pem:ro | ||
- ./cert/client-key.pem:/app/api/clickhouse-cert/client-key.pem:ro | ||
|
||
env_file: | ||
- ./.env | ||
|
||
extra_hosts: | ||
- "ch1.${ASM_CH_DOMAIN}:${ASM_CH_NODE1_IP}" | ||
- "ch2.${ASM_CH_DOMAIN}:${ASM_CH_NODE2_IP}" | ||
- "ch3.${ASM_CH_DOMAIN}:${ASM_CH_NODE3_IP}" | ||
|
||
# front and nginx | ||
analytic-web: | ||
image: ghcr.io/aasaam/analytic-web:latest | ||
depends_on: | ||
- analytic-backend | ||
container_name: analytic-web | ||
ports: | ||
- 80:80 | ||
- 443:443 | ||
environment: | ||
ASM_NGINX_WORKER_PROCESSES: ${ASM_NGINX_WORKER_PROCESSES:-2} | ||
ASM_NGINX_WORKER_RLIMIT_NOFILE: ${ASM_NGINX_WORKER_RLIMIT_NOFILE:-1024} | ||
ASM_NGINX_WORKER_CONNECTIONS: ${ASM_NGINX_WORKER_CONNECTIONS:-512} | ||
ASM_NGINX_ERROR_LOG_LEVEL: ${ASM_NGINX_ERROR_LOG_LEVEL:-warn} | ||
ASM_NGINX_TMPFS_CACHE_SIZE_MB: ${ASM_NGINX_TMPFS_CACHE_SIZE_MB:-128} | ||
ASM_NGINX_LARGE_CACHE_SIZE_MB: ${ASM_NGINX_LARGE_CACHE_SIZE_MB:-2048} | ||
ASM_NGINX_LIMIT_CONNECTION: ${ASM_NGINX_LIMIT_CONNECTION:-16} | ||
ASM_NGINX_LIMIT_RPS: ${ASM_NGINX_LIMIT_RPS:-4} | ||
ASM_NGINX_LIMIT_RATE_KBS: ${ASM_NGINX_LIMIT_RATE_KBS:-32} | ||
ASM_NGINX_LIMIT_BURST: ${ASM_NGINX_LIMIT_BURST:-64} | ||
ASM_NGINX_LIMIT_RATE_AFTER_MB: ${ASM_NGINX_LIMIT_RATE_AFTER_MB:-1} | ||
ASM_APP_PORT: ${ASM_APP_PORT:-3001} | ||
ASM_PUBLIC_BASE_URL: ${ASM_PUBLIC_BASE_URL:-/} | ||
ASM_FRONT_CP_PORT: ${ASM_FRONT_CP_PORT:-3000} | ||
ASM_FRONT_CP_PATH: ${ASM_FRONT_CP_PATH:-_cp} | ||
ASM_ACCESS_LOG_COMMENT: ${ASM_ACCESS_LOG_COMMENT:-} | ||
ASM_PUBLIC_APP_LANG: ${ASM_PUBLIC_APP_LANG:-en} | ||
tmpfs: | ||
- /nginx-tmpfs:rw,nodev,nosuid,noexec,noatime,size=${ASM_NGINX_TMPFS_CACHE_SIZE_MB:-192}m | ||
volumes: | ||
- ./default.conf.template:/etc/nginx/templates/default.conf.template | ||
- ./cert/fullchain.pem:/cert/fullchan.pem:ro | ||
- ./cert/privkey.pem:/cert/privkey.pem:ro | ||
- ./cert/chain.pem:/cert/ca.pem:ro | ||
- ./cert/dhparam.pem:/cert/dhparam.pem:ro | ||
|
||
# databases | ||
analytic-redis: | ||
container_name: analytic-redis | ||
image: redis:6 | ||
|
||
analytic-rest-captcha: | ||
container_name: analytic-captcha | ||
image: ghcr.io/aasaam/rest-captcha:latest | ||
command: run -return-value | ||
|
||
analytic-postgres: | ||
container_name: analytic-postgres | ||
environment: | ||
POSTGRES_DB: ${ASM_POSTGRES_DB:-pg-db} | ||
POSTGRES_USER: ${ASM_POSTGRES_USER:-pg-user} | ||
POSTGRES_PASSWORD: ${ASM_POSTGRES_PASSWORD:-pg-password} | ||
POSTGRES_HOST_AUTH_METHOD: trust | ||
image: postgres:13 | ||
volumes: | ||
- postgres:/var/lib/postgresql/data | ||
|
||
analytic-grafana: | ||
container_name: analytic-grafana | ||
image: ghcr.io/aasaam/grafana:latest | ||
|
||
environment: | ||
- GF_SERVER_ROOT_URL=https://grafana.analyt.ir/grafana/ | ||
- GF_SERVER_SERVE_FROM_SUB_PATH=true | ||
|
||
volumes: | ||
- grafana:/var/lib/grafana | ||
|
||
- ./cert/ca.pem:/cert/ca.pem:ro | ||
- ./cert/client-fullchain.pem:/cert/client-fullchain.pem:ro | ||
- ./cert/client-key.pem:/cert/client-key.pem:ro | ||
|
||
extra_hosts: | ||
- "ch1.${ASM_CH_DOMAIN}:${ASM_CH_NODE1_IP}" | ||
- "ch2.${ASM_CH_DOMAIN}:${ASM_CH_NODE2_IP}" | ||
- "ch3.${ASM_CH_DOMAIN}:${ASM_CH_NODE3_IP}" | ||
|
||
volumes: | ||
postgres: | ||
driver: local | ||
grafana: | ||
driver: local |
Oops, something went wrong.