Stacktora / Templates / Analytics (ClickHouse)
Analytics

Analytics (ClickHouse) boilerplate

Python app with Postgres for OLTP and ClickHouse for analytics. One click generates a complete, runnable bootstrap — docker-compose, Makefile, Dockerfile, CI and more.

Use this template Browse all templates

The stack

Python 3.12 PostgreSQL 5432ClickHouse 8123

docker-compose.yml preview

# docker-compose.yml — generated by Stacktora
services:
  app:
    image: python:3.12-slim
    command: uvicorn app.main:app --reload --host 0.0.0.0
    ports:
      - "8000:8000"
    env_file: [ .env ]
  postgres:
    image: postgres:18-alpine
    ports:
      - "5432:5432"
  clickhouse:
    image: clickhouse/clickhouse-server:26.3
    ports:
      - "8123:8123"
      - "9000:9000"

What you get

docker-compose.ymlMakefileDockerfileREADME.md.env.example.gitignore.dockerignore.github/workflows/ci.yml.tool-versions.editorconfigProcfile … and more

Quickstart

# clone, then one command to a running stack
git clone … && cd app
$ make setup   # install toolchain + deps, build images
$ make dev     # boot the full stack
# → app live at localhost:8000

Related templates

Open Analytics (ClickHouse) in Stacktora