Reorganise a little to move the server into it's own directory
This commit is contained in:
parent
aa2ecace89
commit
5a2d35aca8
5 changed files with 17 additions and 3 deletions
|
@ -5,7 +5,7 @@ WORKDIR /app
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN go mod download
|
RUN go mod download
|
||||||
|
|
||||||
RUN go build -o rove-server -ldflags="-X 'github.com/mdiluz/rove/pkg/version.Version=$(git describe --always --long --dirty --tags)'" .
|
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
|
||||||
|
|
||||||
CMD [ "./rove-server" ]
|
CMD [ "./rove-server" ]
|
||||||
|
|
|
@ -5,7 +5,7 @@ volumes:
|
||||||
|
|
||||||
services:
|
services:
|
||||||
rove-server:
|
rove-server:
|
||||||
build: .
|
image: rove-server:latest
|
||||||
ports:
|
ports:
|
||||||
- "80:80"
|
- "80:80"
|
||||||
command: ./rove-server --port 80 --data=/mnt/rove-server
|
command: ./rove-server --port 80 --data=/mnt/rove-server
|
||||||
|
|
11
script/build.sh
Executable file
11
script/build.sh
Executable file
|
@ -0,0 +1,11 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
cd "$(dirname "$0")"
|
||||||
|
cd ..
|
||||||
|
set -x
|
||||||
|
|
||||||
|
# Generate a version string
|
||||||
|
export VERSION=$(git describe --always --long --dirty --tags)
|
||||||
|
|
||||||
|
# Build and tag as latest and version
|
||||||
|
docker build -t "rove-server:latest" -t "rove-server:${VERSION}" -f "cmd/rove-server/Dockerfile" .
|
|
@ -4,8 +4,11 @@ cd "$(dirname "$0")"
|
||||||
cd ..
|
cd ..
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
|
# Build the image
|
||||||
|
bash script/build.sh
|
||||||
|
|
||||||
# Build and start the service
|
# Build and start the service
|
||||||
docker-compose up --build --detach
|
docker-compose up --detach
|
||||||
|
|
||||||
# Run tests, including integration tests
|
# Run tests, including integration tests
|
||||||
go mod download
|
go mod download
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue