Skip to content

🐸 Rybbit - open-source and privacy-friendly alternative to Google Analytics that is 10x more intuitive.

Update Nginx Proxy Manager configuration to use Docker configs for ClickHouse

Bill Yangf976a192bfb2
diff --git a/docs/content/docs/self-hosting-guides/nginx-proxy-manager.mdx b/docs/content/docs/self-hosting-guides/nginx-proxy-manager.mdx
index 0b3a1e3a2..38691f024 100644
--- a/docs/content/docs/self-hosting-guides/nginx-proxy-manager.mdx
+++ b/docs/content/docs/self-hosting-guides/nginx-proxy-manager.mdx
@@ -34,7 +34,15 @@ services:
container_name: rybbit_clickhouse
volumes:
- ./clickhouse-data:/var/lib/clickhouse
- - ./clickhouse_config:/etc/clickhouse-server/config.d
+ configs:
+ - source: clickhouse_network
+ target: /etc/clickhouse-server/config.d/network.xml
+ - source: clickhouse_json
+ target: /etc/clickhouse-server/config.d/enable_json.xml
+ - source: clickhouse_logging
+ target: /etc/clickhouse-server/config.d/logging_rules.xml
+ - source: clickhouse_user_logging
+ target: /etc/clickhouse-server/config.d/user_logging.xml
environment:
- CLICKHOUSE_DB=${CLICKHOUSE_DB:-analytics}
- CLICKHOUSE_USER=${CLICKHOUSE_USER:-default}
@@ -89,7 +97,7 @@ services:
rybbit_clickhouse:
condition: service_healthy
rybbit_postgres:
- condition: service_started
+ condition: service_healthy
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://127.0.0.1:3001/api/health"]
interval: 3s
@@ -121,9 +129,51 @@ networks:
npm_proxy:
external: true
-volumes:
- clickhouse-data:
- postgres-data:
+configs:
+ clickhouse_network:
+ content: |
+ <clickhouse>
+ <listen_host>0.0.0.0</listen_host>
+ </clickhouse>
+
+ clickhouse_json:
+ content: |
+ <clickhouse>
+ <settings>
+ <enable_json_type>1</enable_json_type>
+ </settings>
+ </clickhouse>
+
+ clickhouse_logging:
+ content: |
+ <clickhouse>
+ <logger>
+ <level>warning</level>
+ <console>true</console>
+ </logger>
+ <query_thread_log remove="remove"/>
+ <query_log remove="remove"/>
+ <text_log remove="remove"/>
+ <trace_log remove="remove"/>
+ <metric_log remove="remove"/>
+ <asynchronous_metric_log remove="remove"/>
+ <session_log remove="remove"/>
+ <part_log remove="remove"/>
+ <latency_log remove="remove"/>
+ <processors_profile_log remove="remove"/>
+ </clickhouse>
+
+ clickhouse_user_logging:
+ content: |
+ <clickhouse>
+ <profiles>
+ <default>
+ <log_queries>0</log_queries>
+ <log_query_threads>0</log_query_threads>
+ <log_processors_profiles>0</log_processors_profiles>
+ </default>
+ </profiles>
+ </clickhouse>
```
</Step>
@@ -175,20 +225,6 @@ docker network connect npm_proxy <npm_container_name>
```
</Step>
-<Step>
-### Copy ClickHouse Config (Optional)
-
-Optionally, copy the ClickHouse configuration for better control:
-
-```bash
-# If you cloned the main repo, copy the config
-cp -r /path/to/rybbit/clickhouse_config ./
-
-# Or download it directly
-curl -L https://github.com/rybbit-io/rybbit/archive/master.tar.gz | tar -xz --strip=2 rybbit-master/clickhouse_config
-```
-</Step>
-
<Step>
### Start Services