Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Masv swagger #10

Merged
merged 4 commits into from
Oct 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
docs/
pki/
12 changes: 4 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -126,17 +126,13 @@ swagger-fmt:
swag fmt

swagger-issuer:
swag init -d internal/issuer/apiv1/ -g client.go --output docs/issuer --parseDependency
swagger-fmt
swag init -d internal/issuer/apiv1/ -g client.go --output docs/issuer --parseDependency --packageName docs

swagger-registry:
swag init -d internal/registry/apiv1/ -g client.go --output docs/registry --parseDependency
swagger-fmt
swag init -d internal/registry/apiv1/ -g client.go --output docs/registry --parseDependency --packageName docs

swagger-datastore:
swag init -d internal/datastore/apiv1/ -g client.go --output docs/datastore --parseDependency
swagger-fmt
swag init -d internal/datastore/apiv1/ -g client.go --output docs/datastore --parseDependency --packageName docs

swagger-verifier:
swag init -d internal/verifier/apiv1/ -g client.go --output docs/verifier --parseDependency
swagger-fmt
swag init -d internal/verifier/apiv1/ -g client.go --output docs/verifier --parseDependency --packageName docs
17 changes: 9 additions & 8 deletions dev_haproxy.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,15 @@ frontend stats
stats uri /
stats refresh 10s

frontend front_http
bind 0.0.0.0:80
bind :::80

redirect scheme https code 301

frontend front_https
bind *:443 ssl crt /etc/ssl/vc.pem alpn h2,http/1.1
#frontend front_http
# bind 0.0.0.0:80
# bind :::80
#
# redirect scheme https code 301

frontend myfrontend
# bind *:443 ssl crt /etc/ssl/vc.pem alpn h2,http/1.1
bind *:80
stats enable

timeout http-request 10s
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ services:
networks:
- vc-net
environment:
- "CA_SLEEP=20"
- "CA_SLEEP=2"
- "CA_ADDR=vc_ca:8080"

networks:
Expand Down
10 changes: 8 additions & 2 deletions dockerfiles/datastore
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,24 @@ WORKDIR /go/src/app

COPY . .

RUN go install github.com/swaggo/swag/cmd/swag@latest

RUN swag init -d internal/datastore/apiv1/ -g client.go --output docs/datastore --parseDependency

RUN swag fmt

RUN --mount=type=cache,target=/root/.cache/go-build GOOS=linux GOARCH=amd64 go build -v -o bin/vc_datastore -ldflags "-w -s --extldflags '-static'" ./cmd/datastore/main.go
#RUN GOOS=linux GOARCH=amd64 go build -v -o bin/vc_datastore -ldflags "-w -s --extldflags '-static'" ./cmd/datastore/main.go

# Deploy
FROM debian:bookworm-slim

WORKDIR /

RUN apt-get update && apt-get install -y curl procps iputils-ping
RUN apt-get update && apt-get install -y curl procps iputils-ping less
RUN rm -rf /var/lib/apt/lists/*

COPY --from=builder /go/src/app/bin/vc_datastore /vc_datastore
COPY --from=builder /go/src/app/docs /docs

EXPOSE 8080

Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/issuer
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ FROM debian:bookworm-slim

WORKDIR /

RUN apt-get update && apt-get install -y curl procps iputils-ping
RUN apt-get update && apt-get install -y curl procps iputils-ping less
RUN rm -rf /var/lib/apt/lists/*

COPY --from=builder /go/src/app/bin/vc_issuer /vc_issuer
Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/registry
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ FROM debian:bookworm-slim

WORKDIR /

RUN apt-get update && apt-get install -y curl procps iputils-ping
RUN apt-get update && apt-get install -y curl procps iputils-ping less
RUN rm -rf /var/lib/apt/lists/*


Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/verifier
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ FROM debian:bookworm-slim

WORKDIR /

RUN apt-get update && apt-get install -y curl procps iputils-ping
RUN apt-get update && apt-get install -y curl procps iputils-ping less
RUN rm -rf /var/lib/apt/lists/*


Expand Down
Loading
Loading