Merge pull request 'Added .env file to docker build' (#6) from dev into main

This commit was merged in pull request #6.
This commit is contained in:
2026-07-20 22:51:56 +02:00
3 changed files with 6 additions and 2 deletions
+2
View File
@@ -0,0 +1,2 @@
DTTMR_OTLP_ENDPOINT=172.17.0.1:4317
DTTMR_DATABASE_URL=postgres://postgres:postgres@172.17.0.1:5432/postgres?sslmode=disable&timezone=utc
+3 -1
View File
@@ -5,7 +5,8 @@ COPY go.mod go.sum ./
RUN go mod download
COPY . .
COPY "./internal" "./internal"
COPY "./cmd" "./cmd"
RUN go build -o ./server github.com/robindittmar/dttmr-api/cmd/api-server
@@ -13,6 +14,7 @@ FROM debian:latest
WORKDIR /app
COPY .env.docker .env
COPY --from=build /app/server /app/server
EXPOSE 8080
+1 -1
View File
@@ -36,6 +36,7 @@ func run(serviceName string, serviceVersion string) error {
setupLogging()
slog.Info("starting service", slog.String("service", serviceName), slog.String("version", serviceVersion))
defer slog.Info("service shutdown!")
cfg := config.Load()
@@ -97,7 +98,6 @@ func run(serviceName string, serviceVersion string) error {
return err
}
slog.Info("service shutdown successful!")
return nil
}