├── .gitignore ├── prometheus ├── prometheus-mysql-exporter │ ├── .my.cnf │ ├── prometheus.yml │ └── prometheus-mysql.yaml └── prometheus-grafana.yml ├── database └── postgres │ └── postgres.yml ├── rabbitmq └── rabbitmq-docker-compose.yml ├── redis ├── redis-docker-compose.yml └── redis-master-slave-replication-docker-compose.yml ├── docker-registry └── docker-registry-compose.yml ├── mysql └── mysql-5.7-docker-compose.yml ├── ecosystem ├── elasticsearch-kibana-docker-compose.yml └── kafka-zookeeper-kafkamanager-docker-compose.yml └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | *.~ 3 | *~ 4 | mysql-db 5 | 6 | -------------------------------------------------------------------------------- /prometheus/prometheus-mysql-exporter/.my.cnf: -------------------------------------------------------------------------------- 1 | [client] 2 | user=root 3 | password=password 4 | -------------------------------------------------------------------------------- /prometheus/prometheus-mysql-exporter/prometheus.yml: -------------------------------------------------------------------------------- 1 | global: 2 | scrape_interval: 2s 3 | scrape_configs: 4 | - job_name: prometheus 5 | static_configs: 6 | - targets: 7 | - prometheus:9090 8 | 9 | - job_name: mysql_exporter 10 | static_configs: 11 | - targets: 12 | - localhost:9104 13 | 14 | -------------------------------------------------------------------------------- /database/postgres/postgres.yml: -------------------------------------------------------------------------------- 1 | version: '3.8' 2 | services: 3 | postgres: 4 | image: postgres:14.1-alpine 5 | restart: always 6 | environment: 7 | - POSTGRES_USER=postgres 8 | - POSTGRES_PASSWORD=postgres 9 | ports: 10 | - '5432:5432' 11 | volumes: 12 | - db:/var/lib/postgresql/data 13 | volumes: 14 | db: 15 | driver: local 16 | -------------------------------------------------------------------------------- /rabbitmq/rabbitmq-docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | services: 3 | rabbitmq: 4 | image: "rabbitmq:3-management" 5 | hostname: "rabbitmq" 6 | environment: 7 | RABBITMQ_ERLANG_COOKIE: "SWQOKODSQALRPCLNMEQG" 8 | RABBITMQ_DEFAULT_USER: "admin" 9 | RABBITMQ_DEFAULT_PASS: "password" 10 | RABBITMQ_DEFAULT_VHOST: "/" 11 | ports: 12 | - "15672:15672" 13 | - "5672:5672" 14 | labels: 15 | NAME: "rabbitmq" 16 | -------------------------------------------------------------------------------- /prometheus/prometheus-grafana.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | services: 3 | prometheus: 4 | image: prom/prometheus 5 | volumes: 6 | - "./prometheus.yml:/etc/prometheus/prometheus.yml" 7 | ports: 8 | - 9090:9090 9 | 10 | grafana: 11 | image: grafana/grafana 12 | container_name: grafana 13 | ports: 14 | - 3000:3000 15 | restart: unless-stopped 16 | environment: 17 | - GF_SECURITY_ADMIN_USER=admin 18 | - GF_SECURITY_ADMIN_PASSWORD=admin 19 | volumes: 20 | - ./grafana:/etc/grafana/provisioning/datasources -------------------------------------------------------------------------------- /redis/redis-docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3.3" 2 | services: 3 | redis: 4 | image: redis:6.0.7 5 | container_name: redis 6 | restart: always 7 | volumes: 8 | - redis_volume_data:/data 9 | ports: 10 | - 6379:6379 11 | redis_insight: 12 | image: redislabs/redisinsight:1.14.0 13 | container_name: redis_insight 14 | restart: always 15 | ports: 16 | - 8001:8001 17 | volumes: 18 | - redis_insight_volume_data:/db 19 | volumes: 20 | redis_volume_data: 21 | redis_insight_volume_data: 22 | -------------------------------------------------------------------------------- /docker-registry/docker-registry-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | services: 3 | docker-registry: 4 | image: registry:2 5 | container_name: docker-registry 6 | ports: 7 | - 5000:5000 8 | restart: always 9 | volumes: 10 | - ./docker-registry:/var/lib/registry 11 | 12 | docker-registry-ui: 13 | image: konradkleine/docker-registry-frontend:v2 14 | container_name: docker-registry-ui 15 | ports: 16 | - 8080:80 17 | environment: 18 | ENV_DOCKER_REGISTRY_HOST: docker-registry 19 | ENV_DOCKER_REGISTRY_PORT: 5000 -------------------------------------------------------------------------------- /redis/redis-master-slave-replication-docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3.3" 2 | services: 3 | redis-master: 4 | image: redis:6.0.7 5 | container_name: redis-master 6 | restart: always 7 | volumes: 8 | - redis_master:/data 9 | ports: 10 | - 6379:6379 11 | 12 | redis-slave: 13 | image: redis:6.0.7 14 | container_name: redis-slave 15 | restart: always 16 | volumes: 17 | - redis_slave:/data 18 | ports: 19 | - 6479:6379 20 | command: redis-server --slaveof redis-master 6379 21 | volumes: 22 | redis_master: 23 | redis_slave: -------------------------------------------------------------------------------- /mysql/mysql-5.7-docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3.7" 2 | services: 3 | mysql: 4 | image: mysql:5.7 5 | container_name: mysql-5.7 6 | restart: always # always restart 7 | environment: 8 | MYSQL_DATABASE: 'test' # name of database 9 | MYSQL_USER: 'sample' # sample is the name of user 10 | MYSQL_PASSWORD: 'password' # password for sample user 11 | MYSQL_ROOT_PASSWORD: 'password' # password for root user 12 | ports: 13 | - '3306:3306' # host port 3306 is mapper to docker port 3306 14 | expose: 15 | - '3306' 16 | volumes: 17 | - ./mysql-db:/var/lib/mysql -------------------------------------------------------------------------------- /ecosystem/elasticsearch-kibana-docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3.7" 2 | services: 3 | elasticsearch: 4 | image: docker.elastic.co/elasticsearch/elasticsearch:7.4.0 5 | container_name: elasticsearch 6 | restart: always 7 | environment: 8 | - xpack.security.enabled=false 9 | - discovery.type=single-node 10 | ulimits: 11 | memlock: 12 | soft: -1 13 | hard: -1 14 | nofile: 15 | soft: 65536 16 | hard: 65536 17 | cap_add: 18 | - IPC_LOCK 19 | volumes: 20 | - ./elasticsearch-data:/usr/share/elasticsearch/data 21 | ports: 22 | - 9200:9200 23 | kibana: 24 | container_name: kibana 25 | image: docker.elastic.co/kibana/kibana:7.4.0 26 | restart: always 27 | environment: 28 | - ELASTICSEARCH_HOSTS=http://elasticsearch:9200 # address of elasticsearch docker container which kibana will connect 29 | ports: 30 | - 5601:5601 31 | depends_on: 32 | - elasticsearch # kibana will start when elasticsearch has started -------------------------------------------------------------------------------- /prometheus/prometheus-mysql-exporter/prometheus-mysql.yaml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | services: 3 | 4 | mysql: 5 | image: mysql 6 | container_name: mysql 7 | restart: always # always restart 8 | environment: 9 | MYSQL_DATABASE: 'test' # name of database 10 | MYSQL_USER: 'sample' # sample is the name of user 11 | MYSQL_PASSWORD: 'password' # password for sample user 12 | MYSQL_ROOT_PASSWORD: 'password' # password for root user 13 | ports: 14 | - '3306:3306' # host port 3306 is mapper to docker port 3306 15 | expose: 16 | - '3306' 17 | volumes: 18 | - ./mysql-db:/var/lib/mysql 19 | 20 | prometheus: 21 | image: prom/prometheus 22 | volumes: 23 | - "./prometheus.yml:/etc/prometheus/prometheus.yml" 24 | ports: 25 | - 9090:9090 26 | 27 | grafana: 28 | image: grafana/grafana 29 | container_name: grafana 30 | ports: 31 | - 3000:3000 32 | restart: unless-stopped 33 | environment: 34 | - GF_SECURITY_ADMIN_USER=admin 35 | - GF_SECURITY_ADMIN_PASSWORD=admin 36 | volumes: 37 | - ./grafana:/etc/grafana/provisioning/datasources 38 | 39 | mysql-exporter: 40 | image: prom/mysqld-exporter 41 | depends_on: 42 | - mysql 43 | command: 44 | - --config.my-cnf=/cfg/.my.cnf 45 | - --mysqld.address=localhost:3306 46 | volumes: 47 | - "./.my.cnf:/cfg/.my.cnf" 48 | ports: 49 | - 9104:9104 -------------------------------------------------------------------------------- /ecosystem/kafka-zookeeper-kafkamanager-docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3.7" 2 | services: 3 | zookeeper: 4 | image: confluentinc/cp-zookeeper:5.5.1 5 | container_name: zookeeper 6 | hostname: zookeeper 7 | restart: always 8 | ports: 9 | - "2181:2181" 10 | environment: 11 | ZOOKEEPER_SERVER_ID: 1 12 | ZOOKEEPER_CLIENT_PORT: 2181 13 | ZOOKEEPER_TICK_TIME: 2000 14 | ZOOKEEPER_INIT_LIMIT: 5 15 | ZOOKEEPER_SYNC_LIMIT: 2 16 | kafka: 17 | image: confluentinc/cp-kafka:5.5.1 18 | container_name: kafka 19 | hostname: kafka 20 | restart: always 21 | ports: 22 | - "9092:9092" 23 | - "9093:9093" 24 | depends_on: 25 | - zookeeper 26 | environment: 27 | KAFKA_BROKER_ID: 1 28 | KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 29 | KAFKA_LISTENERS: INTERNAL://kafka:9092,EXTERNAL://kafka:9093 30 | KAFKA_ADVERTISED_LISTENERS: INTERNAL://kafka:9092,EXTERNAL://[machine-ip-address]:9093 # external clients can connect to 9093 port 31 | KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT 32 | KAFKA_INTER_BROKER_LISTENER_NAME: INTERNAL 33 | KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 34 | KAFKA_JMX_HOSTNAME: "kafka" 35 | KAFKA_JMX_PORT: 9999 36 | KAFKA_JMX_OPTS: "-Djava.rmi.server.hostname=kafka 37 | -Dcom.sun.management.jmxremote.local.only=false 38 | -Dcom.sun.management.jmxremote.rmi.port=9999 39 | -Dcom.sun.management.jmxremote.port=9999 40 | -Dcom.sun.management.jmxremote.authenticate=false 41 | -Dcom.sun.management.jmxremote.ssl=false" 42 | kafka_manager: 43 | image: hlebalbau/kafka-manager:stable 44 | container_name: kakfa-manager 45 | restart: always 46 | ports: 47 | - "9000:9000" 48 | environment: 49 | ZK_HOSTS: "zookeeper-1:2181" 50 | APPLICATION_SECRET: "random-secret" 51 | command: -Dpidfile.path=/dev/null -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ### Motive Behind this project 2 | 3 | Every time you want to work on new product then you have spend much time in setting up those services on your local machine. 4 | Also the installation step is different for each operating system. 5 | This project aims to solve this problem where common product ecosystem can be easily installed on any operating system. 6 | 7 | ### How to Start the services 8 | 9 | - clone the repository 10 | - search for the docker-compose that you want to run 11 | - If it contains Configuration section then modify the docker-compose file with suitable configuration value. 12 | - If you are familiar with docker compose file then you can modify the settings in docker-compose file or run with the default values 13 | - Run the services in foreground mode 14 | 15 | ```bash 16 | docker-compose -f up 17 | ``` 18 | 19 | - or Run the services in background mode 20 | 21 | ```bash 22 | docker-compose -f up -d 23 | ``` 24 | 25 | ### List of services or ecosystem 26 | 27 | 28 | ## Database 29 | 30 | - [MySQL Service](https://github.com/self-tuts/awesome-docker-compose/blob/master/mysql/mysql-5.7-docker-compose.yml) 31 | - Redis 32 | - [Redis Standalone](https://github.com/self-tuts/awesome-docker-compose/blob/master/redis/redis-docker-compose.yml) 33 | - In redis insight use the host ip address 34 | - [Redis Master and Slave Replication](https://github.com/self-tuts/awesome-docker-compose/blob/master/redis/redis-master-slave-replication-docker-compose.yml) 35 | 36 | - [Postgres](https://github.com/self-tuts/awesome-docker-compose/blob/master/database/postgres/postgres.yml) 37 | 38 | 39 | ## Message Queue 40 | 41 | - [Kafka Zookeeper KafkaManager Ecosystem](https://github.com/self-tuts/awesome-docker-compose/blob/master/ecosystem/kafka-zookeeper-kafkamanager-docker-compose.yml) 42 | - Configuration 43 | - **[machine-ip-address]** : provide the ip-address of the machine. 44 | - [RabbitMQ](https://github.com/self-tuts/awesome-docker-compose/blob/master/rabbitmq/rabbitmq-docker-compose.yml) 45 | 46 | ## Big Data 47 | 48 | - [Elasticsearch Kibana Ecosystem](https://github.com/self-tuts/awesome-docker-compose/blob/master/ecosystem/elasticsearch-kibana-docker-compose.yml) 49 | 50 | 51 | ## Metrics and Monitoring 52 | - [Prometheus and Grafana Installation](https://github.com/self-tuts/awesome-docker-compose/blob/master/prometheus/prometheus-grafana.yml) 53 | - [MySQL Prometheus Monitoring using MySQL Exporter](https://github.com/self-tuts/awesome-docker-compose/blob/master/prometheus/prometheus-mysql-exporter/prometheus-mysql.yaml) 54 | - [Prometheus Scraping Config](https://github.com/self-tuts/awesome-docker-compose/blob/master/prometheus/prometheus-mysql-exporter/prometheus.yml) 55 | - [my.cnf Configuration](https://github.com/self-tuts/awesome-docker-compose/blob/master/prometheus/prometheus-mysql-exporter/.my.cnf) 56 | 57 | ## DevOps 58 | 59 | - [Docker Registry](https://github.com/self-tuts/awesome-docker-compose/blob/master/docker-registry/docker-registry-compose.yml) 60 | 61 | 62 | --------------------------------------------------------------------------------