services: clickhouse: image: clickhouse/clickhouse-server:25.4.2 container_name: rybbit-clickhouse volumes: - ${DOCKER_VOLUME_STORAGE:-/mnt/docker-volumes}/rybbit/clickhouse-data:/var/lib/clickhouse 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} - CLICKHOUSE_PASSWORD=${CLICKHOUSE_PASSWORD:-frog} healthcheck: test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8123/ping"] interval: 3s timeout: 5s retries: 5 start_period: 10s restart: unless-stopped expose: - 8123 #networks: # - internal postgres: image: postgres:17-alpine container_name: rybbit-postgres environment: - POSTGRES_USER=${POSTGRES_USER:-frog} - POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-frog} - POSTGRES_DB=${POSTGRES_DB:-analytics} volumes: - ${DOCKER_VOLUME_STORAGE:-/mnt/docker-volumes}/rybbit/postgres-data:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"] interval: 3s timeout: 5s retries: 5 start_period: 10s restart: unless-stopped expose: - 5432 #networks: # - internal backend: image: ghcr.io/rybbit-io/rybbit-backend:${IMAGE_TAG:-latest} container_name: rybbit-backend expose: - 3001 environment: - NODE_ENV=production - CLICKHOUSE_HOST=http://clickhouse:8123 - CLICKHOUSE_DB=${CLICKHOUSE_DB:-analytics} - CLICKHOUSE_PASSWORD=${CLICKHOUSE_PASSWORD:-frog} - POSTGRES_HOST=postgres - POSTGRES_PORT=5432 - POSTGRES_DB=${POSTGRES_DB:-analytics} - POSTGRES_USER=${POSTGRES_USER:-frog} - POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-frog} - BETTER_AUTH_SECRET=${BETTER_AUTH_SECRET} - BASE_URL=${BASE_URL} - DISABLE_SIGNUP=${DISABLE_SIGNUP} - DISABLE_TELEMETRY=${DISABLE_TELEMETRY} - MAPBOX_TOKEN=${MAPBOX_TOKEN} depends_on: clickhouse: condition: service_healthy postgres: condition: service_started healthcheck: test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://127.0.0.1:3001/api/health"] interval: 3s timeout: 5s retries: 5 start_period: 10s restart: unless-stopped #networks: # - internal # - proxy #labels: # - traefik.enable=true # - traefik.docker.network=proxy # - traefik.http.routers.rybbit-api.rule=Host(`rybbit.example.com`) && PathPrefix(`/api`) # - traefik.http.routers.rybbit-api.priority=100 # - traefik.http.services.rybbit-api.loadbalancer.server.port=3001 # - traefik.http.routers.rybbit-api.middlewares=local-ipwhitelist@file client: image: ghcr.io/rybbit-io/rybbit-client:${IMAGE_TAG:-latest} container_name: rybbit-client expose: - 3002 environment: - NODE_ENV=production - NEXT_PUBLIC_BACKEND_URL=${BASE_URL} - NEXT_PUBLIC_DISABLE_SIGNUP=${DISABLE_SIGNUP} depends_on: - backend restart: unless-stopped #networks: # - proxy # - internal #labels: # - traefik.enable=true # - traefik.docker.network=proxy # - traefik.http.routers.rybbit.rule=Host(`rybbit.example.com`) # - traefik.http.services.rybbit.loadbalancer.server.port=3002 # # Optional part for traefik middlewares # - traefik.http.routers.rybbit.middlewares=local-ipwhitelist@file configs: clickhouse_network: content: | 0.0.0.0 clickhouse_json: content: | 1 clickhouse_logging: content: | warning true clickhouse_user_logging: content: | 0 0 0 #networks: # proxy: # external: true # internal: # internal: true