services: clickhouse: image: clickhouse/clickhouse-server:24.8 container_name: aw-rus-1c-clickhouse restart: unless-stopped environment: CLICKHOUSE_DB: ${CLICKHOUSE_DB} CLICKHOUSE_USER: ${CLICKHOUSE_USER} CLICKHOUSE_PASSWORD: ${CLICKHOUSE_PASSWORD} ports: - "${CLICKHOUSE_PORT}:8123" - "${CLICKHOUSE_NATIVE_PORT}:9000" healthcheck: test: [ "CMD-SHELL", "clickhouse-client --host 127.0.0.1 --user \"$${CLICKHOUSE_USER}\" --password \"$${CLICKHOUSE_PASSWORD}\" --database \"$${CLICKHOUSE_DB}\" --query 'SELECT 1' >/dev/null", ] interval: 30s timeout: 10s retries: 5 start_period: 30s volumes: - clickhouse_1c_data:/var/lib/clickhouse - ./clickhouse/init:/docker-entrypoint-initdb.d:ro - ./clickhouse/users.d/99-aw-workforce-dict.xml:/etc/clickhouse-server/users.d/99-aw-workforce-dict.xml:ro volumes: clickhouse_1c_data: