Last active
March 9, 2021 16:40
-
-
Save bobaikato/76b2ba8e593cb436ed7bf3c62727e929 to your computer and use it in GitHub Desktop.
Core service. ELK, Kafka, kafdrop, Redis, Postrgesql, PgAdmin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| version: '3.8' | |
| services: | |
| elk: | |
| image: sebp/elk | |
| ports: | |
| - "5601:5601" #Kibana web interface | |
| - "9200:9200" #Elasticsearch JSON interface | |
| - "5044:5044" #Logstash Beats interface | |
| kafdrop: | |
| image: obsidiandynamics/kafdrop | |
| restart: "no" | |
| ports: | |
| - "9000:9000" | |
| environment: | |
| KAFKA_BROKERCONNECT: "kafka:29092" | |
| depends_on: | |
| - "kafka" | |
| kafka: | |
| image: obsidiandynamics/kafka | |
| restart: "no" | |
| ports: | |
| - "2181:2181" | |
| - "9092:9092" | |
| environment: | |
| KAFKA_LISTENERS: "INTERNAL://:29092,EXTERNAL://:9092" | |
| KAFKA_ADVERTISED_LISTENERS: "INTERNAL://kafka:29092,EXTERNAL://localhost:9092" | |
| KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: "INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT" | |
| KAFKA_INTER_BROKER_LISTENER_NAME: "INTERNAL" | |
| redis: | |
| image: redis | |
| ports: | |
| - "6379:6379" | |
| command: ["redis-server", "--appendonly", "yes", "--requirepass", "red"] | |
| #command: ["redis-server", "--appendonly", "yes"] | |
| hostname: redis | |
| postgres: | |
| image: postgres:latest | |
| restart: always | |
| environment: | |
| POSTGRES_USER: "postgresql" | |
| POSTGRES_PASSWORD: "postgresql" | |
| POSTGRES_DB: "postgresql" | |
| ports: | |
| - "5432:5432" | |
| networks: | |
| - postgresql | |
| volumes: | |
| - database-data:/var/lib/postgresql/data/ # persist data even if container shuts downvolumes: | |
| pgadmin4: | |
| image: dpage/pgadmin4 | |
| restart: always | |
| environment: | |
| PGADMIN_DEFAULT_EMAIL: "[email protected]" | |
| PGADMIN_DEFAULT_PASSWORD: "user" | |
| PGADMIN_LISTEN_PORT: 80 | |
| ports: | |
| - "80:80" | |
| depends_on: | |
| - postgres | |
| networks: | |
| - postgresql | |
| volumes: | |
| - database-data:/var/lib/pgadmin/data/ | |
| links: | |
| - "postgres:pgsql-server" #User this as the hostname to connect to pgAdmin Server | |
| networks: | |
| postgresql: | |
| driver: bridge | |
| volumes: | |
| database-data: # named volumes can be managed easier using docker-compose |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment