Compare commits

...

2 Commits

Author SHA1 Message Date
René Jochum abe26200fa
Add CACHEBUST for dependencies
continuous-integration/drone/tag Build is passing Details
2 years ago
René Jochum fb55c7dbcf
Enable RouterAuth in both services 2 years ago

@ -70,6 +70,7 @@ tasks:
- podman build
-v "{{.BUILD_MOUNT_FOLDER_INT}}:{{.BUILD_MOUNT_FOLDER_INT}}"
-v "{{.VOLUME_PATH}}:/go:rw"
--build-arg CACHEBUST={{.DATE}}
--build-arg VERSION={{.VERSION}}
--build-arg=DOCKER_IO={{.DOCKER_IO}}
--build-arg=DOCKER_ORG_JO_MICRO={{.DOCKER_ORG_JO_MICRO}}
@ -77,6 +78,8 @@ tasks:
-f ./docker/router/Dockerfile
.
vars:
DATE:
sh: date -u -Iseconds
VOLUME_PATH:
sh: podman volume inspect jo_micro-router_go --format "{{"{{"}}.Mountpoint{{"}}"}}"
BUILD_MOUNT_FOLDER_INT:

@ -96,10 +96,12 @@ func main() {
auth2RouterReg.Register(jwtRouter.New())
iService := micro.NewService()
iCReg := components.New(iService, "router", logruscomponent.New(), auth2.ClientAuthComponent(), router.New())
iCReg := components.New(iService, "router", logruscomponent.New(), auth2.RouterAuthComponent(), auth2.ClientAuthComponent(), router.New())
auth2ClientReg := auth2.ClientAuthMustReg(iCReg)
auth2ClientReg.Register(jwtClient.New())
iAuth2RouterReg := auth2.RouterAuthMustReg(iCReg)
iAuth2RouterReg.Register(jwtRouter.New())
iAuth2ClientReg := auth2.ClientAuthMustReg(iCReg)
iAuth2ClientReg.Register(jwtClient.New())
var r *gin.Engine

@ -10,6 +10,8 @@ RUN useradd appuser
ARG VERSION
COPY . /code/
WORKDIR /code
ARG CACHEBUST=1
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -installsuffix cgo -ldflags="-w -s -X 'jochum.dev/jo-micro/router/internal/config.Version=$VERSION'" -o /usr/local/bin/microrouterd jochum.dev/jo-micro/router/cmd/microrouterd
# STEP 2 build a small image

Loading…
Cancel
Save