From a945842e9b9b032dc7a0829a3c877b243fddd418 Mon Sep 17 00:00:00 2001 From: Stefan Prodan Date: Mon, 13 Aug 2018 14:52:49 +0300 Subject: [PATCH] Add VueJS UI --- .gitignore | 1 + Dockerfile | 2 +- Dockerfile.build | 1 + Dockerfile.ci | 2 +- Makefile | 2 + ui/vue.html | 170 +++++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 176 insertions(+), 2 deletions(-) create mode 100644 ui/vue.html diff --git a/.gitignore b/.gitignore index 21dc552..a07d86f 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ .idea/ release/ build/ +gcloud/ diff --git a/Dockerfile b/Dockerfile index 2c5bc62..43f571a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,7 @@ RUN addgroup -S app \ curl openssl netcat-openbsd WORKDIR /home/app - +COPY ./ui ./ui ADD podinfo . RUN chown -R app:app ./ diff --git a/Dockerfile.build b/Dockerfile.build index a822163..e25bdfb 100644 --- a/Dockerfile.build +++ b/Dockerfile.build @@ -1,5 +1,6 @@ FROM alpine:3.7 +COPY ./ui ./ui ADD podinfo /podinfo CMD ["./podinfo"] diff --git a/Dockerfile.ci b/Dockerfile.ci index 3492a81..41986ce 100644 --- a/Dockerfile.ci +++ b/Dockerfile.ci @@ -24,7 +24,7 @@ RUN addgroup -S app \ WORKDIR /home/app COPY --from=builder /go/src/github.com/stefanprodan/k8s-podinfo/podinfo . - +COPY ./ui ./ui RUN chown -R app:app ./ USER app diff --git a/Makefile b/Makefile index 053fe5e..c59207a 100644 --- a/Makefile +++ b/Makefile @@ -21,6 +21,7 @@ build: @echo Building: linux/$(LINUX_ARCH) $(VERSION) ;\ for arch in $(LINUX_ARCH); do \ mkdir -p build/linux/$$arch && CGO_ENABLED=0 GOOS=linux GOARCH=$$arch go build -ldflags="-s -w -X $(GITREPO)/pkg/version.GITCOMMIT=$(GITCOMMIT)" -o build/linux/$$arch/$(NAME) ./cmd/$(NAME) ;\ + cp -r ui/ build/linux/$$arch/ui;\ done .PHONY: tar @@ -45,6 +46,7 @@ docker-build: tar @for arch in $(LINUX_ARCH); do \ mkdir -p build/docker/linux/$$arch ;\ tar -xzf release/$(NAME)_$(VERSION)_linux_$$arch.tgz -C build/docker/linux/$$arch ;\ + cp -r ui/ build/docker/linux/$$arch/ui;\ if [ $$arch == amd64 ]; then \ cp Dockerfile build/docker/linux/$$arch ;\ cp Dockerfile build/docker/linux/$$arch/Dockerfile.in ;\ diff --git a/ui/vue.html b/ui/vue.html new file mode 100644 index 0000000..1cf2a08 --- /dev/null +++ b/ui/vue.html @@ -0,0 +1,170 @@ + + + + {{.Title}} + + + + + + + +
+ + +
+ + + kubernetes +

${ info.title }

+
Response processed by ${ info.hostname }
+ + touch_app + Ping ${ pings } + +
+
+
+ +
+ + +
+

The best way to start developing

+ + stateless microservices with Go for Kubernetes + +
+
+ + + + + + + cloud + + +
Cloud Native
+
+ + Distributed as a Helm chart. Builtin Kubernetes health checks (readiness and liveness). + Graceful shutdown on interrupt signals. + +
+
+ + + + flash_on + + +
Fast development
+
+ + Dependency management with golang/dep. + Structured logging with zerolog. + Error handling with pkg/errors. + +
+
+ + + + build + + +
Release automation
+
+ + Multi-platform Docker image AMD64 and ARMv7. + CI/CD powered by: TravisCI CircleCI Quay.io Google Cloud Container Builder Skaffold Weave Flux. + +
+
+
+
+
+
+
+ + + + +
+ Powered + by podinfo + version ${ info.version } revision ${ info.revision } +
+
+
+
+
+
+
+ + + + + \ No newline at end of file