-
-
Notifications
You must be signed in to change notification settings - Fork 3
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 #9 from coollabsio/next
Next
- Loading branch information
Showing
30 changed files
with
1,632 additions
and
1,797 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,51 @@ | ||
root = "." | ||
testdata_dir = "testdata" | ||
tmp_dir = "tmp" | ||
|
||
[build] | ||
args_bin = [] | ||
bin = "./tmp/main" | ||
cmd = "go build -o ./tmp/main ." | ||
delay = 1000 | ||
exclude_dir = ["assets", "tmp", "vendor", "testdata", "db", "output"] | ||
exclude_file = [] | ||
exclude_regex = ["_test.go"] | ||
exclude_unchanged = false | ||
follow_symlink = false | ||
full_bin = "" | ||
include_dir = [] | ||
include_ext = ["go", "tpl", "tmpl", "html"] | ||
include_file = [] | ||
kill_delay = "0s" | ||
log = "build-errors.log" | ||
poll = false | ||
poll_interval = 0 | ||
post_cmd = [] | ||
pre_cmd = [] | ||
rerun = false | ||
rerun_delay = 500 | ||
send_interrupt = false | ||
stop_on_error = false | ||
|
||
[color] | ||
app = "" | ||
build = "yellow" | ||
main = "magenta" | ||
runner = "green" | ||
watcher = "cyan" | ||
|
||
[log] | ||
main_only = false | ||
time = false | ||
|
||
[misc] | ||
clean_on_exit = false | ||
|
||
[proxy] | ||
app_port = 0 | ||
enabled = false | ||
proxy_port = 0 | ||
|
||
[screen] | ||
clear_on_rebuild = false | ||
keep_scroll = true |
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,2 +1,4 @@ | ||
logs | ||
metrics | ||
tmp | ||
output | ||
db/* | ||
.env |
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,4 @@ | ||
DEBUG=true | ||
TOKEN= | ||
PUSH_ENDPOINT=http://localhost:8000 | ||
PUSH_INTERVAL_SECONDS=1 |
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,75 @@ | ||
name: Sentinel Release | ||
|
||
on: | ||
push: | ||
branches: ['next'] | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: "coollabsio/sentinel" | ||
|
||
jobs: | ||
amd64: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Login to ghcr.io | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build and push | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
file: Dockerfile | ||
platforms: linux/amd64 | ||
push: true | ||
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:next | ||
aarch64: | ||
runs-on: [ self-hosted, arm64 ] | ||
permissions: | ||
contents: read | ||
packages: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Login to ghcr.io | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build and push | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
file: Dockerfile.arm64 | ||
platforms: linux/aarch64 | ||
push: true | ||
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:next-aarch64 | ||
merge-manifest: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
needs: [ amd64, aarch64 ] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Login to ghcr.io | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Create & publish manifest | ||
run: | | ||
docker buildx imagetools create --append ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:next-aarch64 --tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:next |
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,2 +1,4 @@ | ||
logs | ||
metrics | ||
tmp | ||
output | ||
db/* | ||
.env |
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,16 +1,24 @@ | ||
FROM golang:1.22-alpine3.19 AS build | ||
FROM golang:1.23-bullseye AS deps | ||
|
||
WORKDIR /app | ||
COPY go.mod go.sum ./ | ||
RUN go mod download | ||
|
||
FROM golang:1.23-bullseye AS build | ||
|
||
WORKDIR /app | ||
COPY --from=deps /go/pkg/mod /go/pkg/mod | ||
COPY . . | ||
ENV CGO_ENABLED=0 | ||
ENV GOOS=linux | ||
ENV GOARCH=amd64 | ||
RUN go build -o /app/bin/sentinel ./cmd/sentinel | ||
RUN apt-get update && apt-get install -y gcc g++ | ||
ENV CGO_ENABLED=1 \ | ||
GOOS=linux \ | ||
GOARCH=amd64 | ||
|
||
RUN go build -o /app/bin/sentinel ./ | ||
|
||
FROM alpine:3.19 | ||
RUN apk add --no-cache ca-certificates curl | ||
FROM debian:bullseye-slim | ||
RUN apt-get update && apt-get install -y ca-certificates curl && rm -rf /var/lib/apt/lists/* | ||
ENV GIN_MODE=release | ||
COPY --from=build /app/ /app | ||
COPY --from=build /app/bin/sentinel /app/sentinel | ||
CMD ["/app/sentinel"] |
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,16 +1,24 @@ | ||
FROM golang:1.22-alpine3.19 AS build | ||
FROM golang:1.23-bullseye AS deps | ||
|
||
WORKDIR /app | ||
COPY go.mod go.sum ./ | ||
RUN go mod download | ||
|
||
FROM golang:1.23-bullseye AS build | ||
|
||
WORKDIR /app | ||
COPY --from=deps /go/pkg/mod /go/pkg/mod | ||
COPY . . | ||
ENV CGO_ENABLED=0 | ||
ENV GOOS=linux | ||
ENV GOARCH=arm64 | ||
RUN go build -o /app/bin/sentinel ./cmd/sentinel | ||
RUN apt-get update && apt-get install -y gcc g++ | ||
ENV CGO_ENABLED=1 \ | ||
GOOS=linux \ | ||
GOARCH=arm64 | ||
|
||
RUN go build -o /app/bin/sentinel ./ | ||
|
||
FROM alpine:3.19 | ||
RUN apk add --no-cache ca-certificates curl | ||
FROM debian:bullseye-slim | ||
RUN apt-get update && apt-get install -y ca-certificates curl && rm -rf /var/lib/apt/lists/* | ||
ENV GIN_MODE=release | ||
COPY --from=build /app/ /app | ||
COPY --from=build /app/bin/sentinel /app/sentinel | ||
CMD ["/app/sentinel"] | ||
CMD ["/app/sentinel"] |
Oops, something went wrong.