version: "3" services: postgres: image: postgres environment: POSTGRES_USER: ${POSTGRES_USER:-postgres} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres} PGDATA: /data/postgres volumes: - postgres:/data/postgres ports: - 5432:5432 restart: unless-stopped redpanda: image: docker.redpanda.com/vectorized/redpanda:v22.2.2 command: - redpanda start - --smp 1 - --overprovisioned - --node-id 0 - --kafka-addr PLAINTEXT://0.0.0.0:29092,OUTSIDE://0.0.0.0:9092 - --advertise-kafka-addr PLAINTEXT://redpanda:29092,OUTSIDE://localhost:9092 - --pandaproxy-addr 0.0.0.0:8082 - --advertise-pandaproxy-addr localhost:8082 environment: - AUTO_CREATE_TOPICS_ENABLED=true ports: - 8081:8081 - 8082:8082 - 9092:9092 - 9644:9644 - 29092:29092 redpanda-console: image: vectorized/console:latest container_name: redpanda-console entrypoint: /bin/sh command: -c "echo \"$$CONSOLE_CONFIG_FILE\" > /tmp/config.yml; /app/console" environment: CONFIG_FILEPATH: /tmp/config.yml CONSOLE_CONFIG_FILE: | kafka: brokers: ["redpanda:29092"] schemaRegistry: enabled: true urls: ["http://redpanda:8081"] redpanda: adminApi: enabled: true urls: ["http://redpanda:9644"] connect: enabled: true clusters: - name: local-connect-cluster url: http://connect:8083 ports: - 8080:8080 depends_on: - redpanda materialize: image: materialize/materialized:v0.15.0 container_name: materialize command: -w2 --disable-telemetry ports: - 6875:6875 redis: image: bitnami/redis:latest container_name: redis environment: - ALLOW_EMPTY_PASSWORD=yes ports: - 6379:6379 rq-dashboard: image: jaredv/rq-docker:0.0.2 command: rq-dashboard -H redis ports: - 9181:9181 rq-worker: image: jaredv/rq-docker:0.0.2 command: rq worker -u redis://redis:6379 high normal low deploy: replicas: 3 api: build: . environment: DATABASE_URL: postgresql://postgres:postgres@postgres:5432/postgres ports: - 8000:8000 volumes: - ./:/code command: > bash -c " uvicorn beaver.main:app --host 0.0.0.0 --port 8000 --reload --reload-dir /code " depends_on: - postgres - redpanda - materialize - rq-worker ui: build: . environment: BEAVER_HOST: http://localhost ports: - 8501:8501 volumes: - ./:/code command: poetry run streamlit run ui/Home.py depends_on: - api volumes: postgres: