From e9347fd0a112f17b6d98e4a12d02c8557c2a2f16 Mon Sep 17 00:00:00 2001 From: llitfkitfk Date: Mon, 20 Mar 2017 16:31:41 +0800 Subject: [PATCH 1/2] add docker-compose --- docker-compose.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 docker-compose.yml diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..2a8926e --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,13 @@ +version: '2' +services: + app: + image: containerize/golang-react + working_dir: + /go/src/app + ports: + - 5001:5001 + volumes: + - ./:/go/src/app + # tty: true + # stdin_open: true + command: sh -c "make install && make serve" \ No newline at end of file From e77e04d2aa8cc49f7118e09d10c13058c4ce8f98 Mon Sep 17 00:00:00 2001 From: llitfkitfk Date: Mon, 20 Mar 2017 16:37:08 +0800 Subject: [PATCH 2/2] add docker-compose instruction --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 1f70b07..86c4665 100644 --- a/README.md +++ b/README.md @@ -116,6 +116,13 @@ $ make serve that's it. Open [http://localhost:5001/](http://localhost:5001/)(if you use default port) at your browser. Now you ready to start coding your awesome project. + +## demo (using [Docker for Mac](https://docs.docker.com/docker-for-mac/install/) ) +``` +$ docker-compose up -d +``` +Open [http://localhost:5001/](http://localhost:5001/) at your browser. + ## Build Install dependencies and type `NODE_ENV=production make build`. This rule is producing webpack build and regular golang build after that. Result you can find at `$GOPATH/bin`. Note that the binary will be named **as the current project directory**.