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"
    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:
