Skip to content

Commit

Permalink
Merge pull request #173 from movio/docker-compose-pin-versions
Browse files Browse the repository at this point in the history
Update docker-compose setup
  • Loading branch information
pkqk authored Sep 21, 2022
2 parents 6938209 + 8c8f08f commit 2b601fd
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 13 deletions.
7 changes: 5 additions & 2 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
.git
docs
contrib
Dockerfile
Makefile
bramble
contrib
docs
examples
testsrv
9 changes: 4 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
FROM golang:1.17 AS builder
FROM golang:1.17-alpine3.15 AS builder

ARG VERSION=SNAPSHOT
ENV GO111MODULE=on
ENV CGO_ENABLED=0

WORKDIR /workspace

COPY go.mod go.sum /workspace/

RUN go mod download

COPY *.go /workspace/
COPY cmd /workspace/cmd
COPY plugins /workspace/plugins
COPY . /workspace/

RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-X 'github.com/movio/bramble.Version=$VERSION'" -o bramble ./cmd/bramble

Expand All @@ -23,4 +22,4 @@ EXPOSE 8082
EXPOSE 8083
EXPOSE 8084

CMD [ "/bramble", "-conf", "/config.json" ]
CMD [ "/bramble", "-config", "/config.json" ]
6 changes: 3 additions & 3 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ services:
build:
context: examples/gqlgen-service
healthcheck:
test: curl --fail http://localhost:8080/health || exit 1
test: wget -qO - http://localhost:8080/health
interval: 5s
timeout: 1s
retries: 5
expose:
- 8080
gophers-server:
healthcheck:
test: curl --fail http://localhost:8080/health || exit 1
test: wget -qO - http://localhost:8080/health
interval: 5s
timeout: 1s
retries: 5
Expand All @@ -22,7 +22,7 @@ services:
- 8080
nodejs-server:
healthcheck:
test: curl --fail http://localhost:8080/health || exit 1
test: wget -qO - http://localhost:8080/health
interval: 5s
timeout: 1s
retries: 5
Expand Down
4 changes: 3 additions & 1 deletion examples/gqlgen-service/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM golang
FROM golang:1.17-alpine3.15

ENV CGO_ENABLED=0

WORKDIR /go/src/app

Expand Down
4 changes: 3 additions & 1 deletion examples/graph-gophers-service/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM golang
FROM golang:1.17-alpine3.15

ENV CGO_ENABLED=0

WORKDIR /go/src/app

Expand Down
2 changes: 1 addition & 1 deletion examples/nodejs-service/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node
FROM node:18-alpine3.15

COPY . .

Expand Down

0 comments on commit 2b601fd

Please sign in to comment.