From 7d780d05bd75f48b41bc0d0f69c6181eed34ee09 Mon Sep 17 00:00:00 2001 From: Marc Di Luzio Date: Fri, 10 Jul 2020 00:12:35 +0100 Subject: [PATCH] De-scope - remove swagger docs and http proxy HTTP proxy was becoming annoying to maintain, and gRPC is easier to use anyway swagger docs are just part of the fallout --- Dockerfile | 1 - Makefile | 2 -- docker-compose.yml | 28 ++-------------------------- snap/snapcraft.yaml | 10 +--------- 4 files changed, 3 insertions(+), 38 deletions(-) diff --git a/Dockerfile b/Dockerfile index f5a1f4b..74b87c7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,6 @@ RUN go mod download # Build the executables RUN go build -o rove -ldflags="-X 'github.com/mdiluz/rove/pkg/version.Version=$(git describe --always --long --dirty --tags)'" cmd/rove/main.go RUN go build -o rove-server -ldflags="-X 'github.com/mdiluz/rove/pkg/version.Version=$(git describe --always --long --dirty --tags)'" cmd/rove-server/main.go -RUN go build -o rove-server-rest-proxy cmd/rove-server-rest-proxy/main.go CMD [ "./rove-server" ] diff --git a/Makefile b/Makefile index cf7f33b..0ef8cd7 100644 --- a/Makefile +++ b/Makefile @@ -20,8 +20,6 @@ gen: @echo Generating rove server gRPC and gateway protoc --proto_path proto --go_out=plugins=grpc,paths=source_relative:pkg/ proto/rove/rove.proto protoc --proto_path proto --grpc-gateway_out=paths=source_relative:pkg/ proto/rove/rove.proto - @echo Generating rove server swagger - protoc --proto_path proto --swagger_out=logtostderr=true:pkg/ proto/rove/rove.proto test: @echo Unit tests diff --git a/docker-compose.yml b/docker-compose.yml index 7109118..71013b5 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,16 +4,6 @@ volumes: persistent-data: services: - rove-docs: - build: - context: . - dockerfile: Dockerfile.docs - image: rove-docs:latest - ports: - - "80:80" - environment: - - PORT=80 - rove-server: build: context: . @@ -30,29 +20,15 @@ services: - persistent-data:/mnt/rove-server:rw command: [ "./rove-server"] - rove: - depends_on: [ rove-server, rove-docs ] - build: - context: . - dockerfile: Dockerfile - image: rove:latest - ports: - - "8080:8080" - environment: - - PORT=8080 - - ROVE_GRPC=rove-server:9090 - command: [ "./script/wait-for-it.sh", "rove-server:9090", "--", "./rove-server-rest-proxy" ] - rove-tests: - depends_on: [ rove ] + depends_on: [ rove-server ] build: context: . dockerfile: Dockerfile image: rove:latest environment: - - ROVE_HTTP=rove - ROVE_GRPC=rove-server - command: [ "./script/wait-for-it.sh", "rove:8080", "--", "go", "test", "-v", "./...", "--tags=integration", "-cover", "-coverprofile=/mnt/coverage-data/c.out", "-count", "1" ] + command: [ "./script/wait-for-it.sh", "rove-server:9090", "--", "go", "test", "-v", "./...", "--tags=integration", "-cover", "-coverprofile=/mnt/coverage-data/c.out", "-count", "1" ] volumes: - /tmp/coverage-data:/mnt/coverage-data:rw diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index fb83f33..86a2118 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -27,15 +27,7 @@ apps: environment: WORDS_FILE : "$SNAP/data/words_alpha.txt" DATA_PATH : $SNAP_USER_DATA - - rove-rest-server: - command: bin/rove-server-rest-proxy - plugs: - - network - - network-bind - environment: - DATA_PATH : $SNAP_USER_DATA - + parts: go-rove: plugin: go