Posts

Showing posts with the label docker-compose

LEADER_NOT_AVAILABLE - docker container

Image
Clash Royale CLAN TAG #URR8PPP LEADER_NOT_AVAILABLE - docker container setting up docker containers (kafka, zookeeper) and trying to (publish and) consume from another, receive the following error: KafkaError{code=LEADER_NOT_AVAILABLE,val=5,str="Broker: Leader not available"} There is no additional error indication when publishing or consuming. When testing connectivity with telnet 172.18.0.3 9092 I receive the expected result. telnet 172.18.0.3 9092 In [2]: c.list_topics() Out[2]: ClusterMetadata(9ToJF8nPQC-rCTXGxuUalw) In [3]: l = c.list_topics() In [4]: l.brokers Out[4]: {1010: BrokerMetadata(1010, 172.18.0.3:9092)} In [7]: l.orig_broker_name Out[7]: u'172.18.0.3:9092/1010' In [8]: l.topics Out[8]: {'__consumer_offsets': TopicMetadata(__consumer_offsets, 50 partitions), 'item': TopicMetadata(item, 1 partitions), 'mytopic': TopicMetadata(mytopic, 1 partitions)} In [9]: i =l.topics['item'] In [10]: i.partitions Out[10]: {0: Partiti...

how to make Docker-compose run all services when debuging with Pycharm?

Image
Clash Royale CLAN TAG #URR8PPP how to make Docker-compose run all services when debuging with Pycharm? I have a simple dockerized Django gunicorn, nginx, and postgress project (each is a service). When I run it with docker-compose up, everything works: maximd@ubuntu ~/PycharmProjects/MyQ (master) $ docker-compose ps Name Command State Ports ------------------------------------------------------------------------------- myq_database1_1 docker-entrypoint.sh postgres Up 5432/tcp myq_djangoapp_1 /bin/sh -c gunicorn --bind ... Up 8000/tcp myq_nginx_1 nginx -g daemon off; Up 0.0.0.0:8000->80/tcp however when I lunch it though the debug of pycharm, it doesn't run nginx, I suspect that since in my docker-compose.yml file the djangoapp depends on the database service, it just creates them both, but it doesn't run nginx. Here is what I see after I run the debug: maximd...

How do I map an Azure File Share as a volume in a Docker Compose file?

Image
Clash Royale CLAN TAG #URR8PPP How do I map an Azure File Share as a volume in a Docker Compose file? I have so far only found examples on how to create a volume on the host machine, e.g: version: "3.3" services: mysql: image: mysql volumes: - db-data:/var/lib/mysql/data volumes: db-data: So this defines a volume named db-data that will physically be stored on the host machine running the container. Is is possible to makes the db-data volume point to an Azure File Share in an Azure Storage account and how would I specify the needed parameters? 1 Answer 1 From CLI you can create with: docker volume create -d azurefile -o share=myvol --name vol1 docker run -i -t -v vol1:/data busybox In your compose you need to use this skeleton: volumes: myvol: driver: azurefile driver_opts: accountname: ___your__account_name accountkey: ___your_account_key ...