File tree Expand file tree Collapse file tree 2 files changed +48
-2
lines changed Expand file tree Collapse file tree 2 files changed +48
-2
lines changed Original file line number Diff line number Diff line change 1- # you probably don't want to use this Dockerfile directly,
1+ # you probably don't want to build this Dockerfile directly,
22# use `make <svc>` instead
33
4+ #
5+ # pull deps
6+ #
7+ FROM debian:12.8 AS deps
8+
9+
10+ # renovate: datasource=github-releases depName=golang-migrate/migrate
11+ ARG MIGRATE_VERSION =4.18.1
12+
13+
14+ RUN apt update && \
15+ apt install -y wget
16+
17+ # get migrate
18+ RUN wget -q https://github.com/golang-migrate/migrate/releases/download/v$MIGRATE_VERSION/migrate.linux-amd64.tar.gz -O - | tar -xzvf - migrate
19+
20+
421# builder builds a go service
522# the build args SERVICE and VERSION must be set!
623
724FROM golang:1.23-bookworm AS builder
825
26+ #
27+ # build spice helper (for migrations)
28+ #
29+
30+ WORKDIR /build/spice
31+
32+ COPY go.* ./
33+ COPY libs libs
34+ COPY spicedb/migrations spicedb/migrations
35+ RUN go mod download
36+ COPY cmd/spice cmd/spice
37+ RUN CGO_ENABLED =0 GOOS =linux go build -a -o spice cmd/spice/spice.go
38+
39+ #
40+ # build service
41+ #
42+
943ARG SERVICE
1044ARG VERSION
1145
@@ -27,10 +61,22 @@ RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-X main.Version=${VERSION}" -a -
2761
2862FROM alpine:3.21.0 AS production
2963
64+ RUN apk update && apk add postgresql-client --no-cache
65+
3066WORKDIR /app
3167
68+ # copy deps
69+ COPY --from =deps /migrate /usr/bin/migrate
70+ COPY --from =builder /build/spice/spice /usr/bin/spice
71+ COPY docker-run-migrations.sh ./run-migrations.sh
72+
73+ # copy app
3274COPY --from =builder /build/app/app .
3375COPY --from =builder /build/app/migrations ./migrations
76+ COPY spicedb ./spicedb
77+
78+ # fix permissions
79+ RUN chmod +x run-migrations.sh
3480RUN chmod +x app
3581
3682ENV PORT =80
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ import (
1919// to avoid ambiguity please read: https://wiki.helpwave.de/doc/keycloak-jedzCcERwF
2020
2121var (
22- DefaultOAuthIssuerURL = "https://accounts .helpwave.de/realms/helpwave "
22+ DefaultOAuthIssuerURL = "https://id .helpwave.de/realms/main "
2323 DefaultOAuthClientID = "helpwave-services"
2424 onlyFakeAuthEnabled bool
2525 insecureFakeTokenEnable = false
You can’t perform that action at this time.
0 commit comments