Skip to content

Commit 5eeda81

Browse files
authored
fix: adds env binding (#298)
fix: small images Signed-off-by: Gustavo Carvalho <gustavo.carvalho@container-solutions.com>
1 parent 202bb35 commit 5eeda81

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Dockerfile

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,12 @@ RUN make swag
3030
# Build it
3131
RUN GOOS=linux go build -o /api
3232

33-
FROM golang:1.25 AS production
34-
WORKDIR /
33+
FROM gcr.io/distroless/base-debian12 AS production
3534

3635
COPY --from=builder /api /api
3736
# Open port 8080 to traffic
3837
EXPOSE 8080
3938

4039
# Specify the command to run on container start.
41-
CMD ["/api", "run"]
42-
43-
FROM production
40+
ENTRYPOINT ["/api"]
41+
CMD ["run"]

cmd/root.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ func configEnvKeys() {
4444
failIfError(viper.BindEnv("jwt_private_key"))
4545
failIfError(viper.BindEnv("jwt_public_key"))
4646
failIfError(viper.BindEnv("api_allowed_origins"))
47+
failIfError(viper.BindEnv("sso_config"))
48+
failIfError(viper.BindEnv("email_config"))
4749
failIfError(viper.BindEnv("metrics_enabled"))
4850
failIfError(viper.BindEnv("metrics_port"))
4951
}

0 commit comments

Comments
 (0)