Skip to content

Instantly share code, notes, and snippets.

@khaerulumam42
Last active December 20, 2021 04:51
Show Gist options
  • Save khaerulumam42/246d18cda40ffcd83bfc131f4f8def0a to your computer and use it in GitHub Desktop.
Save khaerulumam42/246d18cda40ffcd83bfc131f4f8def0a to your computer and use it in GitHub Desktop.
version: "3.6"
services:
producer:
build:
context: .
dockerfile: Dockerfile-producer
networks:
- outside
container_name: producer
ports:
- 8000:8000
command: gunicorn producer:app --workers 4 --worker-class uvicorn.workers.UvicornWorker --bind 0.0.0.0:8000
consumer:
build:
context: .
dockerfile: Dockerfile-consumer
networks:
- outside
container_name: consumer
command: python3 consumer.py
networks:
outside:
external:
name: tutorial
fastapi==0.70.1
requests==2.26.0
uvicorn==0.16.0
gunicorn==20.1.0
kafka-python==2.0.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment