-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use scratch container to run, update CI
- Loading branch information
Showing
4 changed files
with
32 additions
and
7 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
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,4 @@ | ||
name: Cargo lint and test | ||
name: Cargo lint | ||
|
||
on: | ||
push: | ||
|
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,15 +1,16 @@ | ||
FROM rust:1.80 as builder | ||
FROM rust:1.80-alpine as builder | ||
|
||
WORKDIR /tembo-metrics | ||
|
||
COPY . . | ||
|
||
RUN cargo build --release | ||
RUN apk update && apk upgrade && apk add --no-cache musl-dev openssl ca-certificates | ||
|
||
FROM debian:bookworm-slim | ||
RUN cargo build --release --target x86_64-unknown-linux-musl | ||
|
||
RUN apt-get update && apt-get upgrade -y && apt-get clean && rm -rf /var/lib/apt/lists/* | ||
FROM scratch | ||
|
||
COPY --from=builder /tembo-metrics/target/release/tembo-metrics /usr/local/bin/tembo-metrics | ||
COPY --from=builder /tembo-metrics/target/x86_64-unknown-linux-musl/release/tembo-metrics /tembo-metrics | ||
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ | ||
|
||
CMD ["tembo-metrics"] | ||
CMD ["/tembo-metrics"] |
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,23 @@ | ||
{ | ||
"Version": "2012-10-17", | ||
"Statement": [ | ||
{ | ||
"Sid": "Stmt1722444480676", | ||
"Action": [ | ||
"cloudformation:ListStacks" | ||
], | ||
"Effect": "Allow", | ||
"Resource": "*" | ||
}, | ||
{ | ||
"Sid": "Stmt1722444523636", | ||
"Action": [ | ||
"servicequotas:GetServiceQuota", | ||
"servicequotas:ListServiceQuotas", | ||
"servicequotas:ListServices" | ||
], | ||
"Effect": "Allow", | ||
"Resource": "*" | ||
} | ||
] | ||
} |