-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from eminetto/add-otel-collector
feat: add services to docker-compose
- Loading branch information
Showing
12 changed files
with
107 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
auth/go.work | ||
feedbacks/go.work | ||
votes/go.work |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,17 @@ | ||
FROM golang:1.19.2-alpine AS builder | ||
#RUN apk add build-base | ||
FROM golang:1.20-alpine AS builder | ||
|
||
WORKDIR /app/ | ||
WORKDIR /src | ||
|
||
# Restore dependencies | ||
COPY * /app/ | ||
COPY auth/ . | ||
|
||
RUN ls -la / | ||
RUN go mod download | ||
RUN go mod tidy | ||
|
||
# Build executable | ||
RUN go build -o /app/auth ./ | ||
RUN go build -o /src/auth ./ | ||
|
||
FROM scratch | ||
|
||
WORKDIR /app/ | ||
|
||
COPY --from=builder /app/auth ./ | ||
WORKDIR /src | ||
COPY --from=builder /src/auth ./ | ||
EXPOSE 8081 | ||
CMD ["/app/auth"] | ||
CMD ["/src/auth"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,18 @@ | ||
module auth | ||
module github.com/eminetto/api-o11y/auth | ||
|
||
go 1.12 | ||
go 1.20 | ||
|
||
require ( | ||
github.com/dgrijalva/jwt-go v3.2.0+incompatible | ||
github.com/eminetto/api-o11y v0.0.1 // indirect | ||
github.com/go-chi/chi/v5 v5.0.8 | ||
github.com/go-sql-driver/mysql v1.7.0 | ||
github.com/google/uuid v1.3.0 | ||
github.com/gorilla/context v1.1.1 | ||
github.com/stretchr/testify v1.4.0 | ||
) | ||
|
||
require ( | ||
github.com/davecgh/go-spew v1.1.0 // indirect | ||
github.com/pmezard/go-difflib v1.0.0 // indirect | ||
gopkg.in/yaml.v2 v2.2.2 // indirect | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
github.com/stretchr/objx v0.1.0 h1:4G4v2dO3VZwixGIRoQ5Lfboy6nUhCyYzaqnIAPPhYs4= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,18 @@ | ||
FROM golang:1.20-alpine AS builder | ||
|
||
WORKDIR /src | ||
|
||
# Restore dependencies | ||
COPY feedbacks/ . | ||
|
||
RUN go mod tidy | ||
|
||
# Build executable | ||
RUN go build -o /src/feedbacks ./ | ||
|
||
|
||
FROM scratch | ||
ADD bin/feedbacks / | ||
WORKDIR /src | ||
COPY --from=builder /src/feedbacks ./ | ||
EXPOSE 8082 | ||
CMD ["/feedbacks"] | ||
CMD ["/src/feedbacks"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,17 @@ | ||
FROM golang:1.20-alpine AS builder | ||
|
||
WORKDIR /src | ||
|
||
# Restore dependencies | ||
COPY votes/ . | ||
|
||
RUN go mod tidy | ||
|
||
# Build executable | ||
RUN go build -o /src/votes ./ | ||
|
||
FROM scratch | ||
ADD bin/votes / | ||
WORKDIR /src | ||
COPY --from=builder /src/votes ./ | ||
EXPOSE 8083 | ||
CMD ["/votes"] | ||
CMD ["/src/votes"] |