Giter VIP home page Giter VIP logo

blog-sample's Introduction

blog sample

Build Status

A kind of blog for presentating EFK stack features.

  • Write, view and search blog posts.
  • Sing up, Login. Session is based on cookie.
  • Collect page views and search logs into Elasticsearch via fluentd in Real-Time.
  • Of course, you can view and analyze user actions in Elasticsearch and Kibana.

This repository includes following.

Prerequisite

  • Docker

For local development,

  • Go (>= 1.8)
  • sqlite3

Using Docker: make run

If you using docker, it's easy to work with Elastic stack and fluentd! # set GOPATH variable # export GOPATH=/root/go # make directory mkdir /root/go mkdir -p /root/go/src/github.com/efkbook # change directory cd /root/go/src/github.com/efkbook # git clone git clone https://github.com/efkbook/blog-sample # database migration make migrate/up # build binary make app/build # running docker containers by docker-compose up -d make run

At the first time, docker-compose start creating containers. After starting containers, it's time to access Elasticsearch.

$ curl http://localhost:9200
{
  "name" : "o2r0AqN",
  "cluster_name" : "docker-cluster",
  "cluster_uuid" : "KoAk04RXRbSx3wgLiB_LtA",
  "version" : {
    "number" : "5.4.3",
    "build_hash" : "eed30a8",
    "build_date" : "2017-06-22T00:34:03.743Z",
    "build_snapshot" : false,
    "lucene_version" : "6.5.1"
  },
  "tagline" : "You Know, for Search"
}

It works! And your Kibana console is also available on http://localhost:5601. If Elasticsearch is accecible, blog application can start up.

For contributor

To start a blog application locally, you just go run

go run main.go

To add some external packages, use godep. If you want to use Elasticsearch and/or Fluentd on docker container, you can specify each host via flag. When blog app running on container, Elasticsearch and Fluentd are accessed by using docker links.

Acknowledgement

UI Template is based on BlackrockDigital/startbootstrap-blog-post.

LICENSE

MIT

Author

Kenta Suzuki (a.k.a. suzuken)

blog-sample's People

Contributors

suzuken avatar harukasan avatar tyabu12 avatar flathill avatar nord2sudjp avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.