services: clickhouse: image: clickhouse/clickhouse-server:26.8.27.9 restart: unless-stopped environment: # The user default, with the password given: without one the image lets it in from the # container's network only, and the HTTP interface would be closed to everyone. CLICKHOUSE_USER: default CLICKHOUSE_PASSWORD: ${ADMIN_PASSWORD} CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT: "1" # The stock config logs at trace level into ten files of 1000 MB and keeps its query, metric and # trace tables for ever: on a small machine they would fill the disk over months. This keeps the # server's log under 300 MB and those tables a week. entrypoint: - sh - -c - | cat > /etc/clickhouse-server/config.d/small-machine.xml <<'XML' information100M3 event_date + INTERVAL 7 DAY DELETE event_date + INTERVAL 7 DAY DELETE event_date + INTERVAL 7 DAY DELETE event_date + INTERVAL 7 DAY DELETE event_date + INTERVAL 7 DAY DELETE event_date + INTERVAL 7 DAY DELETE event_date + INTERVAL 7 DAY DELETE XML exec /entrypoint.sh volumes: - data:/var/lib/clickhouse volumes: data: