Skip to content

Commit

Permalink
chore: initialize proof of concept
Browse files Browse the repository at this point in the history
  • Loading branch information
notsu committed Dec 3, 2018
0 parents commit 5a4cbed
Show file tree
Hide file tree
Showing 8 changed files with 57 additions and 0 deletions.
6 changes: 6 additions & 0 deletions build/Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM golang:1.11.1-alpine3.8

# install git, curl and realize
RUN apk add --no-cache git curl && \
go get -u github.com/tockins/realize && \
go get -u github.com/derekparker/delve/cmd/dlv
23 changes: 23 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
version: "3.5"

services:

post:
build:
context: ./
dockerfile: ./build/Dockerfile.dev
volumes:
- ./services/post:/src/go
- $GOPATH/pkg/mod:/go/pkg/mod
working_dir: /src/go
command: go run main.go

user:
build:
context: ./
dockerfile: ./build/Dockerfile.dev
volumes:
- ./services/user:/src/go
- $GOPATH/pkg/mod:/go/pkg/mod
working_dir: /src/go
command: go run main.go
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module github.com/notsu/gomono
1 change: 1 addition & 0 deletions services/post/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module github.com/notsu/gomono/services/post
6 changes: 6 additions & 0 deletions services/post/hello/hello.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package hello

// Hello to another services
func Hello() string {
return "Hello, World"
}
7 changes: 7 additions & 0 deletions services/post/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package main

import "fmt"

func main() {
fmt.Println("Hello from POST")
}
1 change: 1 addition & 0 deletions services/user/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module github.com/notsu/gomono/services/user
12 changes: 12 additions & 0 deletions services/user/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package main

import (
"fmt"

hello "github.com/notsu/gomono/services/post/hello"
)

func main() {
fmt.Println("Hello from USER")
fmt.Println(hello.Hello())
}

0 comments on commit 5a4cbed

Please sign in to comment.