Skip to content

Commit

Permalink
added webui to services
Browse files Browse the repository at this point in the history
  • Loading branch information
nii236 committed Jun 27, 2016
1 parent 3f4f5dd commit f028652
Show file tree
Hide file tree
Showing 7 changed files with 56 additions and 5 deletions.
10 changes: 10 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,16 @@ services:
- "4000:4000"
depends_on:
- nats
web:
build:
dockerfile: ./services/web/Dockerfile
context: ./
command: --broker nats --registry nats --transport nats --broker_address nats:4222 --registry_address nats:4222 --transport_address nats:4222 web
restart: always
ports:
- "8082:8082"
depends_on:
- nats
sidecar:
build:
dockerfile: ./services/Sidecar/Dockerfile
Expand Down
14 changes: 12 additions & 2 deletions glide.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions glide.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,6 @@ import:
- package: google.golang.org/grpc
subpackages:
- metadata
- package: github.com/nii236/nii-finance
subpackages:
- vendor/github.com/serenize/snaker
1 change: 1 addition & 0 deletions services/Sidecar/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM openalgotplatform_go:0.1
WORKDIR /go/src/github.com/nii236/nii-finance/services/Sidecar
COPY . /go/src/github.com/nii236/nii-finance/
RUN go install
ENTRYPOINT ["Sidecar"]
6 changes: 3 additions & 3 deletions services/Sidecar/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
ccli "github.com/micro/cli"
"github.com/micro/go-micro/cmd"
"github.com/micro/micro/car"
"github.com/micro/micro/web"

_ "github.com/micro/go-plugins/broker/nats"
_ "github.com/micro/go-plugins/registry/nats"
Expand All @@ -12,11 +12,11 @@ import (

func main() {
app := cmd.App()
app.Commands = append(app.Commands, car.Commands()...)
app.Commands = append(app.Commands, web.Commands()...)
app.Action = func(context *ccli.Context) { ccli.ShowAppHelp(context) }
cmd.Init(
cmd.Name("micro"),
cmd.Description("This version of micro contains only the sidecar proxy"),
cmd.Description("This version of micro contains only the micro web UI"),
cmd.Version("latest"),
)
}
5 changes: 5 additions & 0 deletions services/web/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM openalgotplatform_go:0.1
WORKDIR /go/src/github.com/nii236/nii-finance/services/web
COPY . /go/src/github.com/nii236/nii-finance/
RUN go install
ENTRYPOINT ["web"]
22 changes: 22 additions & 0 deletions services/web/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package main

import (
ccli "github.com/micro/cli"
"github.com/micro/go-micro/cmd"
"github.com/micro/micro/web"

_ "github.com/micro/go-plugins/broker/nats"
_ "github.com/micro/go-plugins/registry/nats"
_ "github.com/micro/go-plugins/transport/nats"
)

func main() {
app := cmd.App()
app.Commands = append(app.Commands, web.Commands()...)
app.Action = func(context *ccli.Context) { ccli.ShowAppHelp(context) }
cmd.Init(
cmd.Name("micro"),
cmd.Description("This version of micro contains only the web UI"),
cmd.Version("latest"),
)
}

0 comments on commit f028652

Please sign in to comment.