Move game server to port 8080 and host docs on 80

This commit is contained in:
Marc Di Luzio 2020-06-12 17:54:47 +01:00
parent b121b4463e
commit 47921e6c41
5 changed files with 27 additions and 6 deletions

8
Dockerfile.docs Normal file
View file

@ -0,0 +1,8 @@
FROM quay.io/goswagger/swagger:latest
LABEL maintainer="Marc Di Luzio <marc.diluzio@gmail.com>"
WORKDIR /app
COPY . .
CMD [ "serve", "swagger.yml", "--no-open" ]

View file

@ -18,6 +18,9 @@ test:
@echo Integration tests
docker-compose up --build --exit-code-from=rove-tests --abort-on-container-exit rove-tests
go tool cover -html=/tmp/coverage-data/c.out -o /tmp/coverage.html
@echo Validating swagger spec
swagger validate swagger.yml
@echo Done, coverage data can be found in /tmp/coverage.html

View file

@ -13,7 +13,7 @@ import (
)
const (
defaultAddress = "localhost:80"
defaultAddress = "localhost:8080"
)
var serv = func() rove.Server {

View file

@ -13,7 +13,7 @@ import (
)
const (
defaultAddress = "localhost:80"
defaultAddress = "localhost:8080"
)
func Test_InnerMain(t *testing.T) {

View file

@ -18,16 +18,26 @@ services:
- persistent-data:/mnt/rove-server:rw
command: [ ./rove-accountant ]
rove-docs:
build:
context: .
dockerfile: Dockerfile.docs
image: rove-docs:latest
ports:
- "80:80"
environment:
- PORT=80
rove-server:
depends_on: [ rove-accountant ]
depends_on: [ rove-accountant, rove-docs ]
build:
context: .
dockerfile: Dockerfile
image: rove:latest
ports:
- "80:80"
- "8080:8080"
environment:
- HOST_ADDRESS=:80
- HOST_ADDRESS=:8080
- DATA_PATH=/mnt/rove-server
- ACCOUNTANT_ADDRESS=rove-accountant:8081
volumes:
@ -41,7 +51,7 @@ services:
image: rove:latest
environment:
- ACCOUNTANT_ADDRESS=rove-accountant:8081
- ROVE_SERVER_ADDRESS=rove-server:80
- ROVE_SERVER_ADDRESS=rove-server:8080
command: [ "go", "test", "-v", "./...", "--tags=integration", "-cover", "-coverprofile=/mnt/coverage-data/c.out", "-count", "1" ]
volumes:
- /tmp/coverage-data:/mnt/coverage-data:rw