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
| input { | |
| jdbc { | |
| jdbc_driver_library => "/opt/mysql-connector-java-5.1.47/mysql-connector-java-5.1.47-bin.jar" | |
| jdbc_driver_class => "com.mysql.jdbc.Driver" | |
| jdbc_user => "dbuser" | |
| jdbc_password => "dbuserpwd" | |
| jdbc_connection_string => "jdbc:mysql://mysql-db:3306/boilerplate_db?zeroDateTimeBehavior=convertToNull" | |
| schedule => "*/10 * * * * *" | |
| statement => "SELECT Users.id, Users.username FROM Users" | |
| } |
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
| import React, { Component } from "react"; | |
| class App extends Component { | |
| constructor(props) { | |
| super(props); | |
| this.state = { | |
| username: '', | |
| password: '', | |
| search: '', | |
| users: [] |
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
| const elasticsearch = require('elasticsearch'); | |
| const client = new elasticsearch.Client({ | |
| host: 'elasticsearch:9200' | |
| }); | |
| app.post("/users/search", async (req, res) => { | |
| let query = req.body.query; | |
| console.log(`Searching users for ${query}`) | |
| try { | |
| const response = await client.search({ |
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
| $ npm install --save elasticsearch |
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
| # https://github.com/elastic/logstash-docker | |
| FROM docker.elastic.co/logstash/logstash:5.6.15 | |
| USER root | |
| # install packages | |
| RUN yum update -y | |
| RUN yum install unzip -y | |
| # install mysql java connector | |
| ADD https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1.47.zip /opt |
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
| input { | |
| } | |
| filter { | |
| } | |
| output { | |
| } |
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
| http.host: 0.0.0.0 | |
| xpack.monitoring.elasticsearch.url: http://elasticsearch:9200 | |
| path.config: /usr/share/logstash/pipeline/ |
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
| server.port: 5601 | |
| server.host: "0" | |
| elasticsearch.url: "http://elasticsearch:9200" |
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
| elasticsearch: | |
| image: docker.elastic.co/elasticsearch/elasticsearch:5.6.15 | |
| container_name: elasticsearch | |
| environment: | |
| - cluster.name=docker-cluster | |
| - bootstrap.memory_lock=true | |
| - xpack.security.enabled=false | |
| - "ES_JAVA_OPTS=-Xms512m -Xmx512m" | |
| ulimits: | |
| memlock: |
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: "2" | |
| services: | |
| mysql-db: | |
| image: mysql/mysql-server:5.7 | |
| environment: | |
| MYSQL_ROOT_PASSWORD: root | |
| MYSQL_USER: dbuser | |
| MYSQL_PASSWORD: dbuserpwd | |
| MYSQL_DATABASE: boilerplate_db |
NewerOlder