-
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.
- Loading branch information
Showing
14 changed files
with
60 additions
and
430 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,29 @@ | ||
name: Xquare Deployment | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
|
||
jobs: | ||
CD: | ||
permissions: | ||
id-token: write | ||
contents: read | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.18 | ||
|
||
- name: Deploy to xquare | ||
uses: team-xquare/xquare-deployment-action@master | ||
with: | ||
environment: prod | ||
github_token: ${{ secrets.PAT }} | ||
access_key: ${{ secrets.ACCESS_KEY }} | ||
buildargs: | | ||
LOKI_URL=${{ secrets.LOKI_URL }} | ||
PROMETHEUS_URL=${{ secrets.PROMETHEUS_URL }} |
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,6 @@ | ||
config: | ||
name: dashboard-tsdata-bridge | ||
service_type: be | ||
port: 8080 | ||
domain: | ||
prod: tsdata.aliens-dms.com |
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,33 +1,33 @@ | ||
# syntax=docker/dockerfile:1 | ||
|
||
ARG BASE_IMAGE=alpine:3.18.3 | ||
ARG GO_IMAGE=golang:1.21.5-alpine3.18 | ||
|
||
ARG GO_SRC=go-builder | ||
ARG JS_SRC=js-builder | ||
|
||
FROM --platform=${JS_PLATFORM} ${JS_IMAGE} as js-builder | ||
|
||
FROM ${GO_IMAGE} as go-builder | ||
|
||
ARG GO_BUILD_TAGS="oss" | ||
ARG WIRE_TAGS="oss" | ||
ARG BINGO="true" | ||
|
||
WORKDIR /tmp/grafana | ||
WORKDIR /tmp/dashboard-tsdata-bridge | ||
|
||
COPY go.* ./ | ||
COPY .bingo .bingo | ||
|
||
RUN go mod download | ||
|
||
COPY Makefile build.go package.json ./ | ||
COPY Makefile main.go ./ | ||
COPY pkg pkg | ||
|
||
RUN make build WIRE_TAGS=${WIRE_TAGS} | ||
RUN go mod tidy \ | ||
&& go get -u -d -v ./... | ||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -ldflags '-s -w' -o project | ||
|
||
RUN apt update && apt install -y make | ||
RUN make gen-go | ||
RUN make build | ||
|
||
EXPOSE 3000 | ||
FROM scratch | ||
COPY --from=builder /tmp/dashboard-tsdata-bridge / | ||
|
||
ARG RUN_SH=./packaging/docker/run.sh | ||
COPY ${RUN_SH} /run.sh | ||
ARG LOKI_URL | ||
ENV LOKI_URL ${LOKI_URL} | ||
ARG PROMETHEUS_URL | ||
ENV PROMETHEUS_URL ${PROMETHEUS_URL} | ||
|
||
ENTRYPOINT [ "/run.sh" ] | ||
EXPOSE 9090 | ||
CMD ["/project"] |
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
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.