Skip to content

Commit 4e48e5c

Browse files
committed
embed swagger docs into the binary
1 parent 02b321f commit 4e48e5c

17 files changed

+15
-17
lines changed

Dockerfile

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,8 @@ FROM gcr.io/distroless/static-debian11
1818

1919
LABEL com.example.maintainers="User <[email protected]>"
2020

21-
WORKDIR /App
22-
23-
COPY --from=src /go/src/app/server /App/server
24-
25-
# Docker cannot copy hidden .env file. So in Taskfile.yml, we make a copy of it.
26-
COPY --from=src /go/src/app/env.prod /App/.env
27-
28-
# Copies the folder containing swagger assets and our openapi specs.
29-
# Todo: embed the folder using embed tag
30-
COPY --from=src /go/src/app/docs /App/docs
21+
COPY --from=src /go/src/app/server /usr/bin/local/server
3122

3223
EXPOSE 3080
3324

34-
ENTRYPOINT ["/App/server"]
25+
ENTRYPOINT ["/usr/bin/local/server"]
File renamed without changes.

internal/domain/book/model.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ import (
88
type Schema struct {
99
ID int `db:"id"`
1010
Title string `db:"title"`
11-
PublishedDate time.Time `db:"published_date"`
11+
//PublishedDate time.Time `db:"published_date"`
12+
PublishedDate internal.RFC3339 `db:"published_date"`
1213
ImageURL string `db:"image_url"`
1314
Description string `db:"description"`
1415
CreatedAt time.Time `db:"created_at"`
File renamed without changes.

0 commit comments

Comments
 (0)