54 Commits
Author SHA1 Message Date
woggioni b3c240b840 tmp 2026-08-06 08:15:40 +08:00
woggioni 8469bfb350 added otel module to nginx
CI / Build nginx docker images (push) Failing after 6m6s
2026-08-06 02:12:45 +08:00
woggioni ecf2d67aad updated gitea-runner image for k8s
CI / Build Gitea runner docker images (push) Successful in 58s
CI / Build nginx docker images (push) Canceled after 12s
2026-07-31 15:23:10 +08:00
woggioni c3155c153c moved nginx build to hostinger
CI / Build nginx docker images (push) Successful in 1h21m38s
2026-07-31 14:24:23 +08:00
woggioni e2e4b8a68e updated nginx to 1.31.3
CI / Build nginx docker images (push) Canceled after 0s
2026-07-31 14:22:36 +08:00
woggioni d95df1f718 bump opencode to 1.18.10
CI / Build opencode docker images (push) Successful in 14m27s
also added `docker-compose` to opencode
2026-07-30 23:10:49 +08:00
woggioni 5192150a06 bump opencode to 1.18.5
CI / Build opencode docker images (push) Successful in 14m14s
2026-07-25 17:25:00 +08:00
woggioni 65f6866987 Switch opencode image to build from source
CI / Build opencode docker images (push) Successful in 3m39s
2026-07-21 22:04:32 +08:00
woggioni 85be151eac updated opencode to 1.18.4
CI / Build opencode docker images (push) Successful in 8m9s
2026-07-21 04:22:08 +08:00
woggioni e2eb658ac0 Added websocat to opencode image
CI / Build opencode docker images (push) Successful in 7m50s
2026-07-20 14:27:39 +08:00
woggioni ae4f7d431b Revert "added Kimi Code plugin to opencode"
CI / Build opencode docker images (push) Successful in 15s
This reverts commit 6b1a03f066.
2026-07-19 09:21:41 +08:00
woggioni 6b1a03f066 added Kimi Code plugin to opencode
CI / Build opencode docker images (push) Successful in 4m27s
2026-07-19 09:03:16 +08:00
woggioni 1bfaaa2431 bump opencode to 1.18.3
CI / Build opencode docker images (push) Successful in 44s
2026-07-18 14:05:29 +08:00
woggioni d93153c42f added ubuntu image for Gitea actions
CI / Build Gitea runner docker images (push) Successful in 12m50s
2026-07-14 20:40:20 +08:00
woggioni 3a1bd1864f moved back nginx build to home
CI / Build nginx docker images (push) Successful in 15m58s
2026-07-13 09:11:54 +08:00
woggioni 3345937d72 updated pgvector to 0.8.5
CI / Build pgvector docker images (push) Successful in 3m8s
2026-07-12 16:39:58 +08:00
woggioni 05862a0b0d Bump opencode to 1.17.18
CI / Build opencode docker images (push) Successful in 6m11s
2026-07-12 04:46:37 +08:00
woggioni 9c63e06cc8 bump opencode to 1.17.13
CI / Build opencode docker images (push) Successful in 7m44s
2026-07-02 00:07:07 +08:00
woggioni 50ab02aef2 added otel-lgtm image
CI / Build otel-lgtm docker images (push) Successful in 5m8s
2026-06-30 14:19:57 +08:00
woggioni 85e4600ac1 bump opencode to 1.17.11
CI / Build opencode docker images (push) Successful in 6m5s
added buildx to opencode image
2026-06-30 08:14:14 +08:00
woggioni b2fa6abe72 updated opencode to 1.17.11
CI / Build opencode docker images (push) Successful in 8m33s
2026-06-26 21:45:58 +08:00
woggioni 5d9747a65e trying to use upload-artifact action
CI / node-build (push) Successful in 2m23s
CI / docker-build (push) Successful in 1m0s
CI / deploy (push) Successful in 35s
2026-06-25 01:33:33 +08:00
woggioni 051d6e6d23 fix bee-dashboard build
CI / node-build (push) Failing after 2m14s
CI / docker-build (push) Has been skipped
CI / deploy (push) Has been skipped
2026-06-23 07:19:47 +08:00
woggioni 71deed7df1 added Gitea runner pnpm image
CI / Build Gitea runner docker images (push) Successful in 56s
2026-06-23 06:47:34 +08:00
woggioni 21c9741b2d updated bee dashboard to 0.35.1
CI / node-build (push) Failing after 26s
CI / docker-build (push) Has been skipped
CI / deploy (push) Has been skipped
2026-06-23 06:11:44 +08:00
woggioni b8269e690e updated opencode to 1.17.9
CI / Build opencode docker images (push) Successful in 8m12s
2026-06-23 05:42:04 +08:00
woggioni 7a9aebba7d added archlinux image for gitea action runner
CI / Build Gitea runner docker images (push) Successful in 3m51s
2026-06-22 07:36:09 +08:00
woggioni fb262342d0 bump nginx to 1.31.2
CI / Build nginx docker images (push) Successful in 1h47m7s
2026-06-21 16:29:53 +08:00
woggioni 08e800f641 added git to gitea runner builder image
CI / Build Gitea runner docker images (push) Successful in 26s
2026-06-19 23:56:54 +08:00
woggioni 7107c4ed17 updated opencode to 1.17.8
CI / Build opencode docker images (push) Successful in 4m55s
2026-06-19 21:57:41 +08:00
woggioni cf4d471938 added Java image for Gitea runner
CI / Build Gitea runner docker images (push) Successful in 1m57s
2026-06-18 20:44:56 +08:00
woggioni 745916e704 added Gitea runner image
CI / Build Gitea runner docker images (push) Successful in 34m25s
2026-06-15 22:10:05 +08:00
woggioni dbbb616dbe bum opencode to 1.17.7
CI / Build opencode docker images (push) Successful in 16m55s
2026-06-15 12:05:56 +08:00
woggioni 5d45075cce updated bee-dashboard image
CI / Build & deploy Cloudflare page (push) Successful in 2m13s
2026-06-15 09:31:40 +08:00
woggioni b12eab85d3 updated wildfly to 40.0.0
CI / Build wildfly docker images (push) Successful in 2m37s
2026-06-12 22:41:01 +08:00
woggioni faa2b29031 bump opencode version
CI / Build opencode docker images (push) Successful in 6m9s
2026-06-12 22:39:42 +08:00
woggioni 3e2a4a70fe added java 17 to gitea builder
CI / Build arch-builder docker images (push) Successful in 1h49m36s
2026-06-11 08:41:28 +08:00
woggioni 0554eedb74 added musl toolchain to opencode image
CI / Build opencode docker images (push) Successful in 5m16s
2026-06-09 22:27:35 +08:00
woggioni 774b450332 updated opencode image
CI / Build opencode docker images (push) Successful in 5h14m11s
2026-06-08 22:10:41 +08:00
woggioni 9e3b58d89e bump opencode to 1.16.2
CI / Build opencode docker images (push) Successful in 3m52s
2026-06-08 12:19:26 +08:00
woggioni 800bcdaee7 bump synapse to 1.154.0
CI / Build synapse docker images (push) Successful in 53s
2026-06-07 06:25:20 +08:00
woggioni f19fda3814 renamed gitea_act_runner image to gitea-runner
CI / Build arch-builder docker images (push) Has been cancelled
2026-06-06 16:00:16 +08:00
woggioni 98f876b074 updated opencode to 1.16.0
CI / Build opencode docker images (push) Failing after 16m32s
2026-06-05 17:32:45 +08:00
woggioni 838b611cac updated nginx to 1.31.1
CI / Build nginx docker images (push) Has been cancelled
2026-06-02 13:15:18 +08:00
woggioni 83416a1f5d bump opencode to 1.15.13
CI / Build opencode docker images (push) Successful in 3m54s
2026-06-01 21:31:46 +08:00
woggioni d64ee44306 added synapse image
CI / Build synapse docker images (push) Successful in 3m50s
2026-05-29 13:56:23 +08:00
woggioni 86f1f5188c updated opencode to 1.15.11
CI / Build opencode docker images (push) Successful in 16m29s
2026-05-28 18:18:31 +08:00
woggioni e90ddf113e bump opencode to 1.15.5
CI / Build opencode docker images (push) Successful in 15m37s
2026-05-19 11:26:20 +08:00
woggioni 5734f68f97 updated opencode to 1.15.3
CI / Build opencode docker images (push) Successful in 5m36s
2026-05-17 23:27:15 +08:00
woggioni f978e0a26b rebuild nginx 1.30.0
CI / Build nginx docker images (push) Has been cancelled
2026-05-16 14:58:39 +08:00
woggioni 7b1b154e95 upgraded nginx to 1.31.0
CI / Build nginx docker images (push) Successful in 7m21s
2026-05-15 22:47:37 +08:00
woggioni 1f6c90db8c add openssh to arch-builder images
CI / Build arch-builder docker images (push) Successful in 20m58s
CI / Build shadowsocks-rust docker images (push) Has been cancelled
2026-05-15 07:26:45 +08:00
woggioni a6e55ed3e1 shadowsocks-rust to dev tag 2026-05-11 21:02:38 +08:00
woggioni 7ab281bea7 updated xray plugin 2026-05-11 21:01:43 +08:00
38 changed files with 9491 additions and 82 deletions
+3 -3
View File
@@ -101,7 +101,7 @@ jobs:
"gitea.woggioni.net/woggioni/arch-builder:rust-full-sccache" "gitea.woggioni.net/woggioni/arch-builder:rust-full-sccache"
target: rust-full-sccache target: rust-full-sccache
- -
name: Build and push arch-builder gitea_act_runner images name: Build and push arch-builder gitea-runner images
uses: docker/build-push-action@v6 uses: docker/build-push-action@v6
with: with:
builder: multiplatform-builder builder: multiplatform-builder
@@ -110,5 +110,5 @@ jobs:
push: true push: true
pull: true pull: true
tags: | tags: |
"gitea.woggioni.net/woggioni/arch-builder:gitea_act_runner" "gitea.woggioni.net/woggioni/arch-builder:gitea-runner"
target: gitea_act_runner target: gitea-runner
+55 -20
View File
@@ -6,30 +6,53 @@ on:
- 'bee-dashboard/**' - 'bee-dashboard/**'
- '.gitea/workflows/build-bee-dashboard.yaml' - '.gitea/workflows/build-bee-dashboard.yaml'
jobs: jobs:
"Build & deploy Cloudflare page": node-build:
runs-on: woryzen runs-on: hostinger
container:
image: gitea.woggioni.net/woggioni/gitea-runner/pnpm:latest
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@v6
with: with:
path: docker-images path: docker-images
- name: Checkout bee-dashboard sources - name: Checkout bee-dashboard sources
run: /usr/sbin/git clone -b 0.33.3 --depth 1 https://github.com/woggioni/bee-dashboard.git src run: git clone -b v0.35.1 --depth 1 https://gitea.woggioni.net/woggioni/bee-dashboard.git src
- name: Prepare build
run: pnpm install --frozen-lockfile
working-directory: ./src
- name: Execute build - name: Execute build
run: cd src && npm install run: pnpm run build
working-directory: ./src
- name: Copy _headers file - name: Copy _headers file
run: cp docker-images/bee-dashboard/_headers src/build run: cp docker-images/bee-dashboard/_headers src/build
- name: Compress static HTML assets
run: find src/build -name "*.html" -type f -exec gzip -k -9 {} \;
- name: Compress static JS assets
run: find src/build -name "*.js" -type f -exec gzip -k -9 {} \;
- name: Compress static CSS assets
run: find src/build -name "*.css" -type f -exec gzip -k -9 {} \;
- name: Create archive - name: Create archive
run: tar -czf docker-images/bee-dashboard/bee-dashboard.tar -C src/build . run: tar -czf docker-images/bee-dashboard/bee-dashboard.tar -C src/build .
- name: Publish archive to gitea.woggioni.net - name: Upload folder as artifact
run: curl --user woggioni:${{ secrets.PUBLISHER_TOKEN }} --upload-file docker-images/bee-dashboard/bee-dashboard.tar https://gitea.woggioni.net/api/packages/woggioni/generic/bee-dashboard/0.33.3/bee-dashboard.tar uses: actions/upload-artifact@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3.4.0
with: with:
driver: docker-container name: bee-dashboard.tar
platforms: | path: docker-images/bee-dashboard/bee-dashboard.tar
linux/amd64 # - name: Publish archive to gitea.woggioni.net
linux/arm64 # run: curl --user woggioni:${{ secrets.PUBLISHER_TOKEN }} --upload-file docker-images/bee-dashboard/bee-dashboard.tar https://gitea.woggioni.net/api/packages/woggioni/generic/bee-dashboard/0.35.1/bee-dashboard.tar
docker-build:
runs-on: hostinger
needs: node-build
steps:
- name: Checkout sources
uses: actions/checkout@v6
with:
path: docker-images
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: bee-dashboard.tar
path: docker-images/bee-dashboard
- name: Login to Gitea container registry - name: Login to Gitea container registry
uses: docker/login-action@v3 uses: docker/login-action@v3
with: with:
@@ -39,20 +62,32 @@ jobs:
- name: Build and push bee-dashboard images - name: Build and push bee-dashboard images
uses: docker/build-push-action@v6 uses: docker/build-push-action@v6
with: with:
context: "docker-images/bee-dashboard"
builder: multiplatform-builder
platforms: | platforms: |
linux/amd64 linux/amd64
linux/arm64 linux/arm64
context: "docker-images/bee-dashboard"
push: true push: true
pull: true pull: true
ssh: default=/home/luser/.ssh/id_ed25519 build-args: "VERSION=0.35.1"
build-args: "VERSION=0.33.3"
tags: | tags: |
"gitea.woggioni.net/woggioni/bee-dashboard:0.33.3" "gitea.woggioni.net/woggioni/bee-dashboard:0.35.1"
cache-from: type=registry,ref=gitea.woggioni.net/woggioni/bee-dashboard:buildx deploy:
cache-to: type=registry,mode=max,compression=zstd,image-manifest=true,oci-mediatypes=true,ref=gitea.woggioni.net/woggioni/bee-dashboard:buildx runs-on: hostinger
needs: node-build
container:
image: node:26-alpine
steps:
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: bee-dashboard.tar
path: .
- run: mkdir build
- name: Extract artifact
run: tar -C build -xf /workspace/woggioni/docker-images/bee-dashboard.tar
- name: Deploy to Cloudflare - name: Deploy to Cloudflare
run: npx wrangler pages deploy --project-name bee-dashboard --branch main src/build run: npx wrangler pages deploy --project-name bee-dashboard --branch main build
env: env:
CLOUDFLARE_ACCOUNT_ID: ${{ vars.CLOUDFLARE_ACCOUNT_ID }} CLOUDFLARE_ACCOUNT_ID: ${{ vars.CLOUDFLARE_ACCOUNT_ID }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
+94
View File
@@ -0,0 +1,94 @@
name: CI
on:
push:
branches: [ master ]
paths:
- 'gitea-runner/*'
- '.gitea/workflows/build-gitea-runner.yaml'
jobs:
"Build Gitea runner docker images":
runs-on: hostinger
steps:
-
name: Login to Gitea container registry
uses: docker/login-action@v3
with:
registry: gitea.woggioni.net
username: woggioni
password: ${{ secrets.PUBLISHER_TOKEN }}
-
name: Build and push runner image
uses: docker/build-push-action@v6
with:
builder: multiplatform-builder
context: "{{defaultContext}}:gitea-runner"
target: runner
build-args: "ALPINE_VERSION=3.24"
platforms: |
linux/amd64
linux/arm64
push: true
pull: true
tags: |
"gitea.woggioni.net/woggioni/gitea-runner:latest"
-
name: Build and push debian image
uses: docker/build-push-action@v6
with:
builder: multiplatform-builder
context: "{{defaultContext}}:gitea-runner"
target: debian
build-args: "DEBIAN_VERSION=13"
platforms: |
linux/amd64
linux/arm64
push: true
pull: true
tags: |
"gitea.woggioni.net/woggioni/gitea-runner/debian:13"
"gitea.woggioni.net/woggioni/gitea-runner/debian:latest"
-
name: Build and push ubuntu image
uses: docker/build-push-action@v6
with:
builder: multiplatform-builder
context: "{{defaultContext}}:gitea-runner"
target: ubuntu
build-args: "UBUNTU_VERSION=26.04"
platforms: |
linux/amd64
linux/arm64
push: true
pull: true
tags: |
"gitea.woggioni.net/woggioni/gitea-runner/ubuntu:26.04"
"gitea.woggioni.net/woggioni/gitea-runner/ubuntu:latest"
-
name: Build and push archlinux image
uses: docker/build-push-action@v6
with:
builder: multiplatform-builder
context: "{{defaultContext}}:gitea-runner"
target: archlinux
platforms: |
linux/amd64
push: true
pull: true
tags: |
"gitea.woggioni.net/woggioni/gitea-runner/archlinux:latest"
-
name: Build and push pnpm image
uses: docker/build-push-action@v6
with:
builder: multiplatform-builder
context: "{{defaultContext}}:gitea-runner"
target: pnpm
build-args: "ALPINE_VERSION=3.24"
platforms: |
linux/amd64
push: true
pull: true
tags: |
"gitea.woggioni.net/woggioni/gitea-runner/pnpm:latest"
+11 -9
View File
@@ -7,7 +7,7 @@ on:
- '.gitea/workflows/build-nginx.yaml' - '.gitea/workflows/build-nginx.yaml'
jobs: jobs:
"Build nginx docker images": "Build nginx docker images":
runs-on: woryzen runs-on: kvm4
steps: steps:
- -
name: Login to Gitea container registry name: Login to Gitea container registry
@@ -28,15 +28,16 @@ jobs:
linux/arm/v7 linux/arm/v7
push: true push: true
pull: true pull: true
ssh: default=/home/luser/.ssh/id_ed25519 ssh: default=/var/lib/gitea-runner/.ssh/id_ed25519
tags: | tags: |
"gitea.woggioni.net/woggioni/nginx:latest" "gitea.woggioni.net/woggioni/nginx:latest"
"gitea.woggioni.net/woggioni/nginx:v1.30.0" "gitea.woggioni.net/woggioni/nginx:v1.31.3"
secrets: | secrets: |
GIT_AUTH_TOKEN.github.com=${{ secrets.GH_ACCESS_TOKEN }} GIT_AUTH_TOKEN.github.com=${{ secrets.GH_ACCESS_TOKEN }}
build-args: | build-args: |
LIBRESSL_VERSION=4.2.1 LIBRESSL_VERSION=4.3.2
NGINX_VERSION=1.30.0 NGINX_VERSION=1.31.3
NJS_VERSION=0.9.8
NGINX_BRANCH=vanilla NGINX_BRANCH=vanilla
- -
name: Build and push nginx custom images name: Build and push nginx custom images
@@ -50,13 +51,14 @@ jobs:
linux/arm/v7 linux/arm/v7
push: true push: true
pull: true pull: true
ssh: default=/home/luser/.ssh/id_ed25519 ssh: default=/var/lib/gitea-runner/.ssh/id_ed25519
tags: | tags: |
"gitea.woggioni.net/woggioni/nginx:woggioni" "gitea.woggioni.net/woggioni/nginx:woggioni"
"gitea.woggioni.net/woggioni/nginx:v1.30.0-woggioni" "gitea.woggioni.net/woggioni/nginx:v1.31.3-woggioni"
secrets: | secrets: |
GIT_AUTH_TOKEN.github.com=${{ secrets.GH_ACCESS_TOKEN }} GIT_AUTH_TOKEN.github.com=${{ secrets.GH_ACCESS_TOKEN }}
build-args: | build-args: |
LIBRESSL_VERSION=4.2.1 LIBRESSL_VERSION=4.3.2
NGINX_VERSION=1.30.0 NGINX_VERSION=1.31.3
NJS_VERSION=0.9.8
NGINX_BRANCH=woggioni NGINX_BRANCH=woggioni
+25 -5
View File
@@ -8,7 +8,7 @@ on:
- '.gitea/workflows/build-opencode.yaml' - '.gitea/workflows/build-opencode.yaml'
jobs: jobs:
"Build opencode docker images": "Build opencode docker images":
runs-on: woryzen runs-on: hostinger
steps: steps:
- -
name: Login to Gitea container registry name: Login to Gitea container registry
@@ -18,18 +18,38 @@ jobs:
username: woggioni username: woggioni
password: ${{ secrets.PUBLISHER_TOKEN }} password: ${{ secrets.PUBLISHER_TOKEN }}
- -
name: Build and push opencode images name: Build and push opencode binary images
uses: docker/build-push-action@v6 uses: docker/build-push-action@v6
with: with:
builder: multiplatform-builder builder: multiplatform-builder
context: "{{defaultContext}}:opencode" context: "{{defaultContext}}:opencode"
ssh: default=/var/lib/gitea-runner/.ssh/id_ed25519
target: release-bin
build-args: | build-args: |
OPENCODE_VERSION=1.14.48 OPENCODE_VERSION=1.18.10
BUN_VERSION=1.3.14
platforms: | platforms: |
linux/amd64 linux/amd64
push: true push: true
pull: true pull: true
tags: | tags: |
"gitea.woggioni.net/woggioni/opencode:1.14.48" "gitea.woggioni.net/woggioni/opencode:1.18.10-bin"
"gitea.woggioni.net/woggioni/opencode:1.18.10"
"gitea.woggioni.net/woggioni/opencode:latest" "gitea.woggioni.net/woggioni/opencode:latest"
-
name: Build and push opencode build-from-source images
uses: docker/build-push-action@v6
with:
builder: multiplatform-builder
context: "{{defaultContext}}:opencode"
ssh: default=/var/lib/gitea-runner/.ssh/id_ed25519
target: release
build-args: |
OPENCODE_VERSION=1.18.10
BUN_VERSION=1.3.14
platforms: |
linux/amd64
push: true
pull: true
tags: |
"gitea.woggioni.net/woggioni/opencode:1.18.10-bfs"
+38
View File
@@ -0,0 +1,38 @@
name: CI
on:
push:
branches: [ master ]
paths:
- 'otel-lgtm/**'
- '.gitea/workflows/build-otel-lgtm.yaml'
jobs:
"Build otel-lgtm docker images":
runs-on: hostinger
steps:
-
name: Login to Gitea container registry
uses: docker/login-action@v3
with:
registry: gitea.woggioni.net
username: woggioni
password: ${{ secrets.PUBLISHER_TOKEN }}
-
name: Build and push otel-lgtm vanilla images
uses: docker/build-push-action@v6
with:
builder: multiplatform-builder
context: "{{defaultContext}}:otel-lgtm"
platforms: |
linux/amd64
linux/arm64
push: true
pull: true
ssh: default=/var/lib/gitea-runner/.ssh/id_ed25519
tags: |
"gitea.woggioni.net/woggioni/otel-lgtm:latest"
"gitea.woggioni.net/woggioni/otel-lgtm:0.0.1"
secrets: |
GIT_AUTH_TOKEN.github.com=${{ secrets.GH_ACCESS_TOKEN }}
build-args: |
ALPINE_VERSION=3.24
OTELCOL_VERSION=0.154.0
+4 -4
View File
@@ -29,9 +29,9 @@ jobs:
linux/arm64 linux/arm64
tags: | tags: |
"gitea.woggioni.net/woggioni/pgvector:latest" "gitea.woggioni.net/woggioni/pgvector:latest"
"gitea.woggioni.net/woggioni/pgvector:0.8.2-pg18.3-alpine3.23" "gitea.woggioni.net/woggioni/pgvector:0.8.5-pg18.4-alpine3.24"
build-args: | build-args: |
PG_VERSION=18.3 PG_VERSION=18.4
ALPINE_VERSION=3.23 ALPINE_VERSION=3.24
PGVECTOR_VERSION=0.8.2 PGVECTOR_VERSION=0.8.5
+1 -2
View File
@@ -29,6 +29,5 @@ jobs:
pull: false pull: false
ssh: default=/home/luser/.ssh/id_ed25519 ssh: default=/home/luser/.ssh/id_ed25519
tags: | tags: |
"gitea.woggioni.net/woggioni/sserver-rust:latest" "gitea.woggioni.net/woggioni/sserver-rust:dev"
"gitea.woggioni.net/woggioni/sserver-rust:v1.24.0"
build-args: "VERSION=1.24.0" build-args: "VERSION=1.24.0"
+34
View File
@@ -0,0 +1,34 @@
name: CI
on:
push:
branches: [ master ]
paths:
- 'synapse/*'
- '.gitea/workflows/build-synapse.yaml'
jobs:
"Build synapse docker images":
runs-on: woryzen
steps:
-
name: Login to Gitea container registry
uses: docker/login-action@v3
with:
registry: gitea.woggioni.net
username: woggioni
password: ${{ secrets.PUBLISHER_TOKEN }}
-
name: Build and push synapse images
uses: docker/build-push-action@v6
with:
builder: multiplatform-builder
context: "{{defaultContext}}:synapse"
build-args: |
VERSION=1.154.0
platforms: |
linux/amd64
push: true
pull: true
tags: |
"gitea.woggioni.net/woggioni/synapse:latest"
"gitea.woggioni.net/woggioni/synapse:1.154.0"
+2 -2
View File
@@ -26,6 +26,6 @@ jobs:
pull: true pull: true
tags: | tags: |
"gitea.woggioni.net/woggioni/wildfly:latest" "gitea.woggioni.net/woggioni/wildfly:latest"
"gitea.woggioni.net/woggioni/wildfly:39.0.1" "gitea.woggioni.net/woggioni/wildfly:40.0.0"
build-args: "VERSION=39.0.1" build-args: "VERSION=40.0.0"
+4 -4
View File
@@ -16,6 +16,7 @@ RUN rm repository.key
RUN --mount=type=cache,target=/var/cache/pacman pacman -Syu --noconfirm RUN --mount=type=cache,target=/var/cache/pacman pacman -Syu --noconfirm
RUN --mount=type=cache,target=/var/cache/pacman pacman -S --noconfirm --needed \ RUN --mount=type=cache,target=/var/cache/pacman pacman -S --noconfirm --needed \
curl \ curl \
openssh \
aarch64-unknown-linux-musl-gcc x86_64-unknown-linux-musl-gcc \ aarch64-unknown-linux-musl-gcc x86_64-unknown-linux-musl-gcc \
arm-unknown-linux-musleabihf-gcc \ arm-unknown-linux-musleabihf-gcc \
arm-unknown-linux-musleabi-gcc \ arm-unknown-linux-musleabi-gcc \
@@ -70,7 +71,6 @@ RUN --mount=type=cache,target=/var/cache/pacman pacman -S --noconfirm --needed \
imagemagick \ imagemagick \
python-sphinx \ python-sphinx \
python-yaml \ python-yaml \
openssh \
rust \ rust \
rust-src \ rust-src \
rust-bindgen \ rust-bindgen \
@@ -141,10 +141,10 @@ RUN rustup target add \
wasm32-unknown-unknown \ wasm32-unknown-unknown \
wasm32-wasip2 wasm32-wasip2
FROM base AS gitea_act_runner FROM base AS gitea-runner
RUN --mount=type=bind,source=woggioni.net.ca.pem,target=/root.pem trust anchor root.pem RUN --mount=type=bind,source=woggioni.net.ca.pem,target=/root.pem trust anchor root.pem
RUN --mount=type=cache,target=/var/cache/pacman pacman -S --noconfirm --needed nodejs npm docker docker-buildx btrfs-progs hidapi protobuf rustup llvm clang trunk emscripten sccache RUN --mount=type=cache,target=/var/cache/pacman pacman -S --noconfirm --needed nodejs npm docker docker-buildx btrfs-progs hidapi protobuf rustup llvm clang trunk emscripten sccache
RUN --mount=type=cache,target=/var/cache/pacman pacman -S --noconfirm --needed gitea-act-runner jdk21-graalvm-bin jdk25-graalvm-bin jdk21-graalvm-ce-bin jdk25-graalvm-ce-bin go RUN --mount=type=cache,target=/var/cache/pacman pacman -S --noconfirm --needed gitea-runner jdk17-graalvm-ce-bin jdk17-graalvm-bin jdk21-graalvm-bin jdk25-graalvm-bin jdk21-graalvm-ce-bin jdk25-graalvm-ce-bin go
RUN usermod -a luser -G docker RUN usermod -a luser -G docker
USER luser USER luser
WORKDIR /home/luser WORKDIR /home/luser
@@ -167,4 +167,4 @@ RUN cargo install worker-build
RUN cargo install wasm-bindgen-cli RUN cargo install wasm-bindgen-cli
RUN npm install -D wrangler RUN npm install -D wrangler
ENV PATH="/home/luser/.local/bin:/home/luser/.cargo/bin:${PATH}" ENV PATH="/home/luser/.local/bin:/home/luser/.cargo/bin:${PATH}"
CMD ["/usr/lib/gitea/act_runner/act_runner", "daemon", "--config", "/var/lib/gitea/act_runner.yaml"] CMD ["/usr/bin/gitea-runner", "daemon", "--config", "/var/lib/gitea/runner.yaml"]
+1 -1
View File
@@ -1,4 +1,4 @@
FROM gitea.woggioni.net/woggioni/nginx:v1.29.4 FROM gitea.woggioni.net/woggioni/nginx:v1.31.2
RUN mkdir /srv/http RUN mkdir /srv/http
RUN --mount=type=bind,source=bee-dashboard.tar,target=/bee-dashboard.tar tar -xf /bee-dashboard.tar -C /srv/http RUN --mount=type=bind,source=bee-dashboard.tar,target=/bee-dashboard.tar tar -xf /bee-dashboard.tar -C /srv/http
COPY bee-dashboard.conf /etc/nginx/conf.d/http/bee-dashboard.conf COPY bee-dashboard.conf /etc/nginx/conf.d/http/bee-dashboard.conf
+6
View File
@@ -1,6 +1,12 @@
server { server {
listen 80; listen 80;
listen [::]:80;
http2 on;
root /srv/http; root /srv/http;
gzip_static on;
gzip_vary on;
gzip off;
location / { location / {
} }
} }
+73
View File
@@ -0,0 +1,73 @@
ARG ALPINE_VERSION=3.24
ARG DEBIAN_VERSION=13
ARG UBUNTU_VERSION=26.04
FROM alpine:${ALPINE_VERSION} AS runner
RUN echo "@testing https://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories
RUN --mount=type=cache,target=/var/cache/apk apk update
RUN --mount=type=cache,target=/var/cache/apk apk add gitea-runner@testing nodejs docker shadow
RUN usermod -u 1000 gitea-runner
RUN addgroup gitea-runner docker
USER gitea-runner
WORKDIR /var/lib/gitea-runner
CMD ["/usr/bin/gitea-runner", "daemon", "--config", "/etc/gitea-runner/config.yaml"]
FROM debian:${DEBIAN_VERSION}-slim AS debian
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
apt update &&\
apt install -y nodejs unzip git
RUN useradd gitea-runner -d /var/lib/gitea-runner -u 1000 -r
USER gitea-runner
WORKDIR /var/lib/gitea-runner
FROM ubuntu:${UBUNTU_VERSION} AS ubuntu
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
apt update &&\
apt install -y nodejs unzip git
RUN userdel ubuntu
RUN useradd gitea-runner -d /var/lib/gitea-runner -u 1000 -r
USER gitea-runner
WORKDIR /var/lib/gitea-runner
FROM archlinux:latest AS archlinux
COPY mirrorlist /etc/pacman.d/mirrolist
RUN pacman-key --init
#RUN pacman-key --refresh-keys
RUN curl --retry 3 -OJ https://gitea.woggioni.net/api/packages/woggioni/arch/repository.key
RUN pacman-key --add repository.key
RUN pacman-key --lsign-key 0D28BF66FDB45D18D8EBEE5D4C91DADCD00B3F77
RUN --mount=type=bind,source=pacman-gitea-repository.conf,target=pacman-gitea-repository.conf cat pacman-gitea-repository.conf >> /etc/pacman.conf
RUN rm repository.key
RUN --mount=type=cache,target=/var/cache/pacman pacman -Syu --noconfirm
RUN --mount=type=cache,target=/var/cache/pacman pacman -S --noconfirm --needed \
nodejs \
git \
aarch64-unknown-linux-musl-gcc x86_64-unknown-linux-musl-gcc \
arm-unknown-linux-musleabihf-gcc \
arm-unknown-linux-musleabi-gcc \
x86_64-unknown-linux-musl-gcc \
x86_64-w64-mingw32-gcc \
aarch64-unknown-linux-musl-gcc x86_64-unknown-linux-musl-zlib \
arm-unknown-linux-musleabihf-zlib \
arm-unknown-linux-musleabi-zlib \
x86_64-unknown-linux-musl-zlib \
x86_64-w64-mingw32-zlib \
upx
RUN ln -s /opt/x-tools/aarch64-unknown-linux-musl/bin/aarch64-unknown-linux-musl-gcc /usr/local/bin/aarch64-linux-musl-gcc
RUN ln -s /opt/x-tools/x86_64-unknown-linux-musl/bin/x86_64-unknown-linux-musl-gcc /usr/local/bin/x86_64-linux-musl-gcc
RUN ln -s /opt/x-tools/arm-unknown-linux-musleabihf/bin/arm-unknown-linux-musleabihf-gcc /usr/local/bin/arm-linux-musleabihf-gcc
RUN ln -s /opt/x-tools/arm-unknown-linux-musleabihf/bin/arm-unknown-linux-musleabi-gcc /usr/local/bin/arm-linux-musleabi-gcc
RUN ln -s /opt/x-tools/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-gcc /usr/local/bin/x86_64-pc-windows-gnu-gcc
RUN useradd gitea-runner -u 1000 -s /bin/bash -m -d /var/lib/gitea-runner
FROM alpine:${ALPINE_VERSION} AS pnpm
RUN --mount=type=cache,target=/var/cache/apk apk update
RUN --mount=type=cache,target=/var/cache/apk apk add nodejs shadow git pnpm
RUN adduser -S -u 1000 -h /var/lib/gitea-runner gitea-runner
USER gitea-runner
WORKDIR /var/lib/gitea-runner
+15
View File
@@ -0,0 +1,15 @@
################################################################################
################# Arch Linux mirrorlist generated by Reflector #################
################################################################################
# With: reflector @/etc/xdg/reflector/reflector.conf
# When: 2024-07-09 04:16:31 UTC
# From: https://archlinux.org/mirrors/status/json/
# Retrieved: 2024-07-09 04:16:31 UTC
# Last Check: 2024-07-09 03:46:09 UTC
Server = https://archlinux.thaller.ws/$repo/os/$arch
Server = https://mirror.ubrco.de/archlinux/$repo/os/$arch
Server = https://mirror.qctronics.com/archlinux/$repo/os/$arch
Server = https://mirrors.neusoft.edu.cn/archlinux/$repo/os/$arch
Server = https://arch.phinau.de/$repo/os/$arch
@@ -0,0 +1,4 @@
[woggioni.gitea.woggioni.net]
SigLevel = Required
Server = https://gitea.woggioni.net/api/packages/woggioni/arch/default/x86_64
+27 -6
View File
@@ -1,8 +1,8 @@
ARG NGINX_BRANCH=vanilla ARG NGINX_BRANCH=vanilla
FROM alpine:3.23 AS base FROM alpine:3.24 AS base
FROM base AS build_stage_1 FROM base AS build_stage_1
ARG NGINX_VERSION LIBRESSL_VERSION ARG NGINX_VERSION LIBRESSL_VERSION NJS_VERSION
RUN --mount=type=cache,target=/var/cache/apk apk update RUN --mount=type=cache,target=/var/cache/apk apk update
RUN --mount=type=cache,target=/var/cache/apk apk add \ RUN --mount=type=cache,target=/var/cache/apk apk add \
autoconf \ autoconf \
@@ -10,9 +10,11 @@ RUN --mount=type=cache,target=/var/cache/apk apk add \
bind-tools \ bind-tools \
binutils \ binutils \
build-base \ build-base \
c-ares-dev \
ca-certificates \ ca-certificates \
cmake \ cmake \
gcc \ gcc \
g++ \
gd-dev \ gd-dev \
geoip-dev \ geoip-dev \
git \ git \
@@ -30,12 +32,12 @@ RUN --mount=type=cache,target=/var/cache/apk apk add \
pcre-dev \ pcre-dev \
perl-dev \ perl-dev \
quickjs-dev \ quickjs-dev \
re2-dev \
su-exec \ su-exec \
tar \ tar \
tzdata \ tzdata \
zlib \ zlib \
zlib-dev \ zlib-dev
mercurial
RUN adduser -D luser RUN adduser -D luser
USER luser USER luser
WORKDIR /home/luser WORKDIR /home/luser
@@ -48,12 +50,14 @@ RUN mkdir -p libressl/build
RUN cmake -G Ninja -B libressl/build -S libressl \ RUN cmake -G Ninja -B libressl/build -S libressl \
-DCMAKE_BUILD_TYPE=Release \ -DCMAKE_BUILD_TYPE=Release \
-DLIBRESSL_APPS=OFF \ -DLIBRESSL_APPS=OFF \
-DLIBRESSL_SKIP_INSTALL=ON \ -DLIBRESSL_SKIP_INSTALL=OFF \
-DCMAKE_INSTALL_PREFIX=/home/luser/.local \
-DENABLE_ASM=OFF \ -DENABLE_ASM=OFF \
-DENABLE_NC=OFF \ -DENABLE_NC=OFF \
-DLIBRESSL_TESTS=OFF \ -DLIBRESSL_TESTS=OFF \
-DBUILD_SHARED_LIBS=OFF -DBUILD_SHARED_LIBS=OFF
RUN cmake --build libressl/build RUN cmake --build libressl/build
RUN cmake --install libressl/build
FROM build_stage_1 AS build_stage_2_vanilla FROM build_stage_1 AS build_stage_2_vanilla
ARG NGINX_VERSION ARG NGINX_VERSION
@@ -69,7 +73,7 @@ ADD --chown=luser:luser https://github.com/google/ngx_brotli.git /ngx_brotli
USER root USER root
WORKDIR / WORKDIR /
RUN hg clone http://hg.nginx.org/njs /njs ADD --chown=luser:luser git@github.com:nginx/njs.git#${NJS_VERSION} /njs
RUN chown luser:luser -R /njs RUN chown luser:luser -R /njs
USER luser USER luser
WORKDIR /home/luser WORKDIR /home/luser
@@ -83,6 +87,22 @@ WORKDIR /home/luser
ADD --chown=luser:luser --chmod=755 ./build-rtmp.sh ./build-rtmp.sh ADD --chown=luser:luser --chmod=755 ./build-rtmp.sh ./build-rtmp.sh
RUN ./build-rtmp.sh RUN ./build-rtmp.sh
FROM build AS build-otel
ADD --chown=luser:luser https://github.com/nginx/nginx-otel.git#v0.1.2 /nginx-otel
USER luser
RUN cmake -G Ninja -B /home/luser/otel-build -S /nginx-otel \
-DNGX_OTEL_NGINX_BUILD_DIR=/nginx/objs \
-DCMAKE_BUILD_TYPE=Release \
-DOPENSSL_ROOT_DIR=/home/luser/.local \
-DNGX_OTEL_SDK=6f65c3eded2bb4656c8d675cad43bbe694c531c7 \
-DNGX_OTEL_GRPC=c876f4da50f7da2f331888b88b2a7243514139fe \
-DWITH_OTLP_GRPC=ON \
-DWITH_OTLP_HTTP=ON \
-DWITH_BENCHMARK=OFF \
-DWITH_FUNC_TESTS=OFF \
&& cmake --build /home/luser/otel-build
FROM base AS release FROM base AS release
ARG VERSION ARG VERSION
ENV NGINX_VERSION=${VERSION} ENV NGINX_VERSION=${VERSION}
@@ -100,6 +120,7 @@ RUN --mount=type=cache,target=/var/cache/apk \
(cd nginx && sh /install.sh) (cd nginx && sh /install.sh)
RUN --mount=type=cache,target=/var/cache/apk apk del .install_deps RUN --mount=type=cache,target=/var/cache/apk apk del .install_deps
COPY --from=build-rtmp --chown=root:root /nginx/objs/ngx_rtmp_module.so /usr/lib/nginx/modules/ COPY --from=build-rtmp --chown=root:root /nginx/objs/ngx_rtmp_module.so /usr/lib/nginx/modules/
COPY --from=build-otel --chown=root:root /home/luser/otel-build/ngx_otel_module.so /usr/lib/nginx/modules/
COPY --from=build /home/luser/libressl/openssl.cnf /etc/ssl/openssl.cnf COPY --from=build /home/luser/libressl/openssl.cnf /etc/ssl/openssl.cnf
COPY conf/nginx.conf /etc/nginx/nginx.conf COPY conf/nginx.conf /etc/nginx/nginx.conf
COPY conf/dhparam /etc/nginx/dhparam COPY conf/dhparam /etc/nginx/dhparam
+1 -1
View File
@@ -17,7 +17,7 @@ strip -s /usr/lib/nginx/modules/*.so
apk add --no-cache --virtual .gettext gettext apk add --no-cache --virtual .gettext gettext
mv /usr/bin/envsubst /tmp/ mv /usr/bin/envsubst /tmp/
runDeps="libintl libxml2 musl zlib tzdata ca-certificates pcre brotli-libs libxslt geoip" runDeps="libintl libxml2 musl zlib tzdata ca-certificates pcre brotli-libs libxslt geoip libstdc++ c-ares libprotobuf re2"
apk add --no-cache $runDeps apk add --no-cache $runDeps
apk del .gettext apk del .gettext
mv /tmp/envsubst /usr/local/bin/ mv /tmp/envsubst /usr/local/bin/
+37 -12
View File
@@ -1,8 +1,30 @@
FROM archlinux:latest AS release ARG BUN_VERSION
FROM oven/bun:${BUN_VERSION}-slim AS build
ARG OPENCODE_VERSION ARG OPENCODE_VERSION
# RUN --mount=type=cache,target=/var/cache/apk apk update
# RUN --mount=type=cache,target=/var/cache/apk apk add python3 make g++ npm zip git
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
apt update &&\
apt install -y python3 make g++ npm zip git
#RUN adduser -D -h /home/builder -u 1126 builder
RUN useradd -m -u 1126 builder
USER builder
WORKDIR /home/builder
ADD --chown=builder:builder --keep-git-dir=true git@github.com:anomalyco/opencode.git#v${OPENCODE_VERSION} opencode
WORKDIR /home/builder/opencode
RUN --mount=type=cache,target=/home/builder/.bun/install/cache,uid=1126 bun install
ADD --chown=builder:builder ./build.ts ./packages/opencode/script/build.ts
RUN --mount=type=cache,target=/home/builder/.bun/install/cache,uid=1126 ./packages/opencode/script/build.ts
FROM archlinux:latest AS base-release
ARG OPENCODE_VERSION
COPY mirrorlist /etc/pacman.d/mirrolist COPY mirrorlist /etc/pacman.d/mirrolist
RUN pacman-key --init RUN pacman-key --init
#RUN pacman-key --refresh-keys #RUN pacman-key --refresh-keys
@@ -12,29 +34,32 @@ RUN pacman-key --add repository.key
RUN pacman-key --lsign-key 0D28BF66FDB45D18D8EBEE5D4C91DADCD00B3F77 RUN pacman-key --lsign-key 0D28BF66FDB45D18D8EBEE5D4C91DADCD00B3F77
RUN --mount=type=bind,source=pacman-gitea-repository.conf,target=pacman-gitea-repository.conf cat pacman-gitea-repository.conf >> /etc/pacman.conf RUN --mount=type=bind,source=pacman-gitea-repository.conf,target=pacman-gitea-repository.conf cat pacman-gitea-repository.conf >> /etc/pacman.conf
RUN echo PATH DEFAULT=${HOME}/.local/bin:/usr/local/bin:/bin >> /etc/security/pam_env.conf RUN echo 'PATH DEFAULT=${HOME}/.local/bin:${HOME}/.cargo/bin:/usr/local/bin:/bin' >> /etc/security/pam_env.conf
RUN rm repository.key RUN rm repository.key
RUN --mount=type=cache,target=/var/cache/pacman pacman -Syu --noconfirm RUN --mount=type=cache,target=/var/cache/pacman pacman -Syu --noconfirm
RUN --mount=type=cache,target=/var/cache/pacman pacman -S --noconfirm --needed \ RUN --mount=type=cache,target=/var/cache/pacman pacman -S --noconfirm --needed \
rustup rust-analyzer jdtls python-pipx ripgrep git rustup gradle curl sccache openssh \ xdg-utils rustup rust-analyzer jdtls python-pipx ripgrep git rustup gradle curl sccache openssh \
helix bash-language-server marksman python-lsp-server vscode-css-languageserver \ bash-language-server marksman python-lsp-server vscode-css-languageserver x86_64-unknown-linux-musl-zlib x86_64-unknown-linux-musl-gcc \
vscode-html-languageserver vscode-json-languageserver yaml-language-server base-devel vscode-html-languageserver vscode-json-languageserver yaml-language-server base-devel docker docker-buildx docker-compose less websocat
RUN --mount=type=cache,target=/var/cache/pacman pacman -S --noconfirm --needed jdk25-graalvm-ce-bin RUN --mount=type=cache,target=/var/cache/pacman pacman -S --noconfirm --needed jdk25-graalvm-bin
RUN useradd -m -d /var/lib/opencode opencode RUN useradd -m -d /var/lib/opencode opencode
RUN mkdir /workspace RUN mkdir /workspace
RUN chown opencode:opencode /workspace RUN chown opencode:opencode /workspace
USER opencode USER opencode
RUN pipx install pyright RUN pipx install pyright
RUN pipx install pip-tools
USER root USER root
ADD https://github.com/anomalyco/opencode/releases/download/v${OPENCODE_VERSION}/opencode-linux-x64.tar.gz ./opencode.tgz
RUN tar -xvf ./opencode.tgz -C /usr/bin
RUN rm opencode.tgz
ADD --chown=opencode:opencode ./opencode.json /etc/opencode/opencode.json ADD --chown=opencode:opencode ./opencode.json /etc/opencode/opencode.json
RUN mkdir -p /usr/lib/opencode/addons RUN mkdir -p /usr/lib/opencode/addons
ADD --chmod=644 https://repo1.maven.org/maven2/org/projectlombok/lombok/1.18.44/lombok-1.18.44.jar /usr/lib/opencode/addons/lombok.jar ADD --chmod=644 https://repo1.maven.org/maven2/org/projectlombok/lombok/1.18.46/lombok-1.18.46.jar /usr/lib/opencode/addons/lombok.jar
ENV OPENCODE_CONFIG=/etc/opencode/opencode.json ENV OPENCODE_CONFIG=/etc/opencode/opencode.json
ENV EDITOR=helix
USER opencode USER opencode
WORKDIR /workspace WORKDIR /workspace
ENTRYPOINT ["opencode"] ENTRYPOINT ["opencode"]
VOLUME ["/var/lib/opencode", "/workspace"] VOLUME ["/var/lib/opencode", "/workspace"]
FROM base-release AS release
COPY --from=build --chown=root:root /home/builder/opencode/packages/opencode/dist/opencode-linux-x64/bin/opencode /usr/bin/opencode
FROM base-release AS release-bin
ADD --unpack https://github.com/anomalyco/opencode/releases/download/v${OPENCODE_VERSION}/opencode-linux-x64.tar.gz /usr/bin
+220
View File
@@ -0,0 +1,220 @@
#!/usr/bin/env bun
import { $ } from "bun"
import path from "path"
import { fileURLToPath } from "url"
import { createSolidTransformPlugin } from "@opentui/solid/bun-plugin"
const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)
const dir = path.resolve(__dirname, "..")
process.chdir(dir)
const generated = await import("./generate.ts")
import { Script } from "@opencode-ai/script"
import pkg from "../package.json"
const singleFlag = process.argv.includes("--single")
const baselineFlag = process.argv.includes("--baseline")
const skipInstall = process.argv.includes("--skip-install")
const sourcemapsFlag = process.argv.includes("--sourcemaps")
const plugin = createSolidTransformPlugin()
const skipEmbedWebUi = process.argv.includes("--skip-embed-web-ui")
const createEmbeddedWebUIBundle = async () => {
console.log(`Building Web UI to embed in the binary`)
const appDir = path.join(import.meta.dirname, "../../app")
const dist = path.join(appDir, "dist")
await $`OPENCODE_CHANNEL=${Script.channel} bun run --cwd ${appDir} build`
const files = (await Array.fromAsync(new Bun.Glob("**/*").scan({ cwd: dist })))
.map((file) => file.replaceAll("\\", "/"))
.filter((file) => !file.endsWith(".map"))
.sort()
const imports = files.map((file, i) => {
const spec = path.relative(dir, path.join(dist, file)).replaceAll("\\", "/")
return `import file_${i} from ${JSON.stringify(spec.startsWith(".") ? spec : `./${spec}`)} with { type: "file" };`
})
const entries = files.map((file, i) => ` ${JSON.stringify(file)}: file_${i},`)
return [
`// Import all files as file_$i with type: "file"`,
...imports,
`// Export with original mappings`,
`export default {`,
...entries,
`}`,
].join("\n")
}
const embeddedFileMap = skipEmbedWebUi ? null : await createEmbeddedWebUIBundle()
const treeSitterWorker = await Bun.file(fileURLToPath(import.meta.resolve("@opentui/core/parser.worker"))).text()
const allTargets: {
os: string
arch: "arm64" | "x64"
abi?: "musl"
avx2?: false
}[] = [
{
os: "linux",
arch: "arm64",
},
{
os: "linux",
arch: "x64",
},
{
os: "linux",
arch: "x64",
avx2: false,
},
{
os: "linux",
arch: "arm64",
abi: "musl",
},
{
os: "linux",
arch: "x64",
abi: "musl",
},
{
os: "linux",
arch: "x64",
abi: "musl",
avx2: false,
}
]
const targets = singleFlag
? allTargets.filter((item) => {
if (item.os !== process.platform || item.arch !== process.arch) {
return false
}
// When building for the current platform, prefer a single native binary by default.
// Baseline binaries require additional Bun artifacts and can be flaky to download.
if (item.avx2 === false) {
return baselineFlag
}
// also skip abi-specific builds for the same reason
if (item.abi !== undefined) {
return false
}
return true
})
: allTargets
await $`rm -rf dist`
const binaries: Record<string, string> = {}
if (!skipInstall) {
await $`bun install --os="*" --cpu="*" @opentui/core@${pkg.dependencies["@opentui/core"]}`
await $`bun install --os="*" --cpu="*" @parcel/watcher@${pkg.dependencies["@parcel/watcher"]}`
await $`bun install --os="*" --cpu="*" @ff-labs/fff-bun@${pkg.dependencies["@ff-labs/fff-bun"]}`
}
for (const item of targets) {
const name = [
pkg.name,
// changing to win32 flags npm for some reason
item.os === "win32" ? "windows" : item.os,
item.arch,
item.avx2 === false ? "baseline" : undefined,
item.abi === undefined ? undefined : item.abi,
]
.filter(Boolean)
.join("-")
console.log(`building ${name}`)
await $`mkdir -p dist/${name}/bin`
const workerPath = "./src/cli/tui/worker.ts"
const treeSitterWorkerPath = "opentui-tree-sitter-worker.js"
const bunfsRoot = item.os === "win32" ? "B:/~BUN/root/" : "/$bunfs/root/"
await Bun.build({
conditions: ["bun", "node"],
tsconfig: "./tsconfig.json",
plugins: [plugin],
external: ["node-gyp"],
format: "esm",
minify: true,
bytecode: true,
sourcemap: sourcemapsFlag ? "linked" : "none",
splitting: true,
compile: {
autoloadBunfig: false,
autoloadDotenv: false,
autoloadTsconfig: true,
autoloadPackageJson: true,
target: name.replace(pkg.name, "bun") as any,
outfile: `dist/${name}/bin/opencode`,
execArgv: [`--user-agent=opencode/${Script.version}`, "--use-system-ca", "--"],
windows: {},
},
files: {
[treeSitterWorkerPath]: treeSitterWorker,
...(embeddedFileMap ? { "opencode-web-ui.gen.ts": embeddedFileMap } : {}),
},
entrypoints: [
"./src/index.ts",
workerPath,
treeSitterWorkerPath,
...(embeddedFileMap ? ["opencode-web-ui.gen.ts"] : []),
],
define: {
FFF_LIBC: JSON.stringify(item.abi === "musl" ? "musl" : "gnu"),
OPENCODE_VERSION: `'${Script.version}'`,
OPENCODE_MODELS_DEV: generated.modelsData,
OTUI_TREE_SITTER_WORKER_PATH: bunfsRoot + treeSitterWorkerPath,
OPENCODE_WORKER_PATH: workerPath,
OPENCODE_CHANNEL: `'${Script.channel}'`,
OPENCODE_LIBC: item.os === "linux" ? `'${item.abi ?? "glibc"}'` : "",
...(item.os === "linux" ? { "process.env.OPENTUI_LIBC": JSON.stringify(item.abi ?? "glibc") } : {}),
},
})
// Smoke test: only run if binary is for current platform
if (item.os === process.platform && item.arch === process.arch && !item.abi) {
const binaryPath = `dist/${name}/bin/opencode`
console.log(`Running smoke test: ${binaryPath} --version`)
try {
const versionOutput = await $`${binaryPath} --version`.text()
console.log(`Smoke test passed: ${versionOutput.trim()}`)
} catch (e) {
console.error(`Smoke test failed for ${name}:`, e)
process.exit(1)
}
}
await $`rm -rf ./dist/${name}/bin/tui`
await Bun.file(`dist/${name}/package.json`).write(
JSON.stringify(
{
name,
version: Script.version,
preferUnplugged: true,
os: [item.os],
cpu: [item.arch],
...(item.abi ? { libc: [item.abi] } : {}),
},
null,
2,
),
)
binaries[name] = Script.version
}
if (Script.release) {
for (const key of Object.keys(binaries)) {
if (key.includes("linux")) {
await $`tar -czf ../../${key}.tar.gz *`.cwd(`dist/${key}/bin`)
} else {
await $`zip -r ../../${key}.zip *`.cwd(`dist/${key}/bin`)
}
}
}
export { binaries }
+84
View File
@@ -0,0 +1,84 @@
# syntax=docker/dockerfile:1
ARG ALPINE_VERSION=3.24
ARG OTELCOL_VERSION=0.154.0
FROM alpine:${ALPINE_VERSION} AS base
FROM base AS downloader
ARG OTELCOL_VERSION
WORKDIR /downloads
RUN --mount=type=cache,target=/var/cache/apk \
apk add curl tar ca-certificates
RUN ARCH=$(uname -m) && \
case "$ARCH" in \
x86_64) TARGETARCH=amd64 ;; \
aarch64) TARGETARCH=arm64 ;; \
*) echo "Unsupported architecture: $ARCH"; exit 1 ;; \
esac && \
curl -fLo otelcol.tar.gz \
"https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v${OTELCOL_VERSION}/otelcol-contrib_${OTELCOL_VERSION}_linux_${TARGETARCH}.tar.gz" && \
tar xzf otelcol.tar.gz && \
chmod +x otelcol-contrib
FROM base
# Install Grafana stack and supervisord from Alpine repositories.
RUN --mount=type=cache,target=/var/cache/apk \
apk add \
ca-certificates \
supervisor \
grafana \
mimir \
loki \
tempo
# Copy the OTel Collector binary from the downloader stage.
COPY --from=downloader /downloads/otelcol-contrib /usr/local/bin/otelcol-contrib
# Create data, Grafana, and supervisor directories.
RUN mkdir -p /data/grafana && \
mkdir -p /data/grafana/logs && \
mkdir -p /data/grafana/plugins && \
mkdir -p /data/mimir && \
mkdir -p /data/loki && \
mkdir -p /data/tempo && \
mkdir -p /etc/grafana/provisioning/datasources && \
mkdir -p /etc/grafana/provisioning/dashboards && \
mkdir -p /etc/grafana/provisioning/plugins && \
mkdir -p /etc/grafana/provisioning/alerting && \
mkdir -p /var/log/supervisor && \
mkdir -p /var/run
# Copy configuration files.
COPY config/grafana.ini /etc/grafana.ini
COPY config/grafana-datasources.yaml /etc/grafana/provisioning/datasources/datasources.yaml
COPY config/grafana-dashboards.yaml /etc/grafana/provisioning/dashboards/grafana-dashboards.yaml
COPY config/grafana-dashboard-jvm-metrics.json /usr/share/grafana/grafana-dashboard-jvm-metrics.json
COPY config/grafana-dashboard-red-metrics-classic.json /usr/share/grafana/grafana-dashboard-red-metrics-classic.json
COPY config/grafana-dashboard-red-metrics-native.json /usr/share/grafana/grafana-dashboard-red-metrics-native.json
COPY config/opentelemetry-collector-hostmetrics-node-exporter.json /usr/share/grafana/opentelemetry-collector-hostmetrics-node-exporter.json
RUN mkdir -p /var/lib/grafana/plugins
RUN grafana cli --config /etc/grafana.ini --homepath /usr/share/grafana --pluginsDir /var/lib/grafana/plugins plugins install grafana-exploretraces-app
RUN grafana cli --config /etc/grafana.ini --homepath /usr/share/grafana --pluginsDir /var/lib/grafana/plugins plugins install grafana-lokiexplore-app
RUN grafana cli --config /etc/grafana.ini --homepath /usr/share/grafana --pluginsDir /var/lib/grafana/plugins plugins install grafana-metricsdrilldown-app
RUN grafana cli --config /etc/grafana.ini --homepath /usr/share/grafana --pluginsDir /var/lib/grafana/plugins plugins install grafana-pyroscope-app
COPY config/mimir.yaml /etc/mimir/mimir.yaml
COPY config/loki.yaml /etc/loki/loki.yaml
COPY config/tempo.yaml /etc/tempo/tempo.yaml
COPY config/otelcol.yaml /etc/otelcol/otelcol.yaml
COPY config/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
# Grafana anonymous admin access, provisioning path, and disable plugin pre-install.
VOLUME ["/data"]
EXPOSE 3000 4318
HEALTHCHECK --interval=30s --timeout=5s --retries=3 \
CMD wget -qO- http://127.0.0.1:3000/api/health >/dev/null 2>&1 && \
wget -qO- http://127.0.0.1:13133/ready >/dev/null 2>&1
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]
+108
View File
@@ -0,0 +1,108 @@
# OTel LGTM (Alpine + supervisord)
A single-container observability backend running on Alpine Linux with supervisord.
Components:
- **Grafana** — visualization UI
- **Mimir** — metrics storage
- **Loki** — log storage
- **Tempo** — trace storage
- **OpenTelemetry Collector (contrib)** — OTLP receiver and router
## Ports
| Port | Service | Description |
|------|---------|-------------|
| 3000 | Grafana | Web UI |
| 4318 | OTel Collector | OTLP/HTTP endpoint |
Only these two ports are exposed. All other services communicate internally on `127.0.0.1`.
## Build
```bash
docker build -t otel-lgtm .
```
> The Dockerfile uses BuildKit cache mounts for `apk`. Make sure BuildKit is enabled (default in recent Docker Desktop / `docker buildx`).
### Build args
| Build arg | Default | Description |
|-----------|---------|-------------|
| `ALPINE_VERSION` | `3.24` | Alpine Linux base image version |
| `OTELCOL_VERSION` | `0.154.0` | OpenTelemetry Collector Contrib version |
Grafana, Mimir, Loki, and Tempo versions are determined by the chosen Alpine repository.
Example:
```bash
docker build --build-arg OTELCOL_VERSION=0.155.0 -t otel-lgtm .
```
### Multi-architecture
The Dockerfile detects the build architecture at build time, so it works on both `amd64` and `arm64`. To build a true multi-arch image in one command, use Docker BuildKit / `docker buildx`:
```bash
docker buildx build --platform linux/amd64,linux/arm64 -t otel-lgtm .
```
## Run
```bash
docker run -p 3000:3000 -p 4318:4318 -v lgtm-data:/data otel-lgtm
```
Grafana is available at http://localhost:3000 with anonymous admin access enabled.
Send telemetry to the collector at `http://localhost:4318` (OTLP/HTTP).
## Data persistence
All persistent data is written under `/data`:
| Path | Service |
|------|---------|
| `/data/grafana` | Grafana data, logs, and plugins |
| `/data/mimir` | Mimir metrics storage |
| `/data/loki` | Loki log storage |
| `/data/tempo` | Tempo trace storage |
Mount a volume there to persist data across container restarts.
## Architecture
```
Application ──OTLP/HTTP──> OTel Collector :4318
├─ metrics ──OTLP/HTTP──> Mimir :9009
├─ logs ─────OTLP/HTTP──> Loki :3100
└─ traces ───OTLP/HTTP──> Tempo :3200
Grafana :3000 queries Mimir, Loki, and Tempo.
```
## Read-only root filesystem
The image can be run with an immutable root filesystem (`--read-only`). A few runtime-only directories must be mounted as writable `tmpfs`:
```bash
docker run --read-only \
-p 3000:3000 -p 4318:4318 \
-v lgtm-data:/data \
--tmpfs /tmp:rw,noexec,nosuid,size=100m \
--tmpfs /run:rw,noexec,nosuid,size=10m \
--tmpfs /var/log/supervisor:rw,noexec,nosuid,size=50m \
otel-lgtm
```
Persistent data continues to live on the `/data` volume, while temporary/runtime state stays in memory.
## Notes
- This image is intended for development, demo, and testing environments.
- Grafana authentication is disabled (`anonymous` admin).
- Grafanas default async plugin pre-installation is disabled to avoid relying on internet access at startup.
@@ -0,0 +1,928 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"target": {
"limit": 100,
"matchAny": false,
"tags": [],
"type": "dashboard"
},
"type": "dashboard"
}
]
},
"description": "Dashboard for JVM metrics with OpenTelemetry instrumentation",
"editable": true,
"fiscalYearStartMonth": 0,
"gnetId": 18812,
"graphTooltip": 0,
"links": [
{
"asDropdown": false,
"icon": "info",
"includeVars": false,
"keepTime": false,
"tags": [],
"targetBlank": false,
"title": "Semantic Conventions: 1.20.0 - 1.22.0",
"tooltip": "multiple versions of the semantic conventions are supported using 'or' and regex queries",
"type": "link",
"url": "https://github.com/open-telemetry/semantic-conventions/blob/main/schemas/1.20.0"
}
],
"liveNow": false,
"panels": [
{
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"description": "HTTP server request rate",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 25,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "reqps"
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 4,
"x": 0,
"y": 0
},
"id": 51,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"editorMode": "code",
"expr": "sum by (instance) (rate({__name__=~\"http_server_request_duration_seconds_count|http_server_request_duration_count|http_server_duration_seconds_count|http_server_duration_count|http_server_duration_milliseconds_count|http_server_requests_milliseconds_count|http_server_requests_count|http_server_requests_seconds_count\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))",
"instant": false,
"legendFormat": "__auto",
"range": true,
"refId": "A"
}
],
"title": "Rate",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"description": "HTTP server error ratio - ratio of requests that return 5xx",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 25,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "percentunit"
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 5,
"x": 4,
"y": 0
},
"id": 50,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"editorMode": "code",
"expr": "(sum by (instance)(rate({__name__=~\"http_server_request_duration_seconds_count|http_server_request_duration_count\", job=~\"$job\", instance=~\"$instance\", http_response_status_code=~\"5.*\"}[$__rate_interval]))) / on (instance) (sum by (instance)(rate({__name__=~\"http_server_request_duration_seconds_count|http_server_request_duration_count\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])))\nor\n(sum by (instance)(rate({__name__=~\"http_server_duration_milliseconds_count|http_server_duration_seconds_count|http_server_duration_count\", job=~\"$job\", instance=~\"$instance\", http_status_code=~\"5.*\"}[$__rate_interval]))) / on (instance) (sum by (instance)(rate({__name__=~\"http_server_duration_milliseconds_count|http_server_duration_seconds_count|http_server_duration_count\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])))\nor\n(sum by (instance)(rate({__name__=~\"http_server_requests_milliseconds_count|http_server_requests_count|http_server_requests_seconds_count\", job=~\"$job\", instance=~\"$instance\", outcome=\"SERVER_ERROR\"}[$__rate_interval]))) / on (instance) (sum by (instance)(rate({__name__=~\"http_server_requests_milliseconds_count|http_server_requests_count|http_server_requests_seconds_count\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])))\n",
"instant": false,
"legendFormat": "__auto",
"range": true,
"refId": "A"
}
],
"title": "Error %",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"description": "95th percentile of HTTP server request duration in seconds",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 25,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "s"
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 5,
"x": 9,
"y": 0
},
"id": 52,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"editorMode": "code",
"expr": "(histogram_quantile(0.95, sum by(le, instance) (rate({__name__=~\"http_server_request_duration_seconds_bucket|http_server_request_duration_bucket|http_server_duration_seconds_bucket|http_server_duration_bucket|http_server_requests_seconds_bucket\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))))\nor\n(histogram_quantile(0.95, sum by(le, instance) (rate({__name__=~\"http_server_duration_milliseconds_bucket|http_server_requests_milliseconds_bucket|http_server_requests_bucket\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))) / 1000)\n",
"instant": false,
"legendFormat": "{{instance}}",
"range": true,
"refId": "A"
}
],
"title": "Duration (95%)",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"description": "CPU utilization for the whole system",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 25,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "percentunit"
},
"overrides": []
},
"gridPos": {
"h": 7,
"w": 7,
"x": 0,
"y": 8
},
"id": 38,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "multi",
"sort": "desc"
}
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"editorMode": "code",
"expr": "{__name__=~\"jvm_cpu_recent_utilization|jvm_cpu_recent_utilization_ratio|process_runtime_jvm_system_cpu_utilization|process_runtime_jvm_system_cpu_utilization_ratio|system_cpu_usage\", job=~\"$job\", instance=~\"$instance\"}",
"legendFormat": "{{instance}}",
"range": true,
"refId": "A"
}
],
"title": "CPU utilization",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"description": "Used heap memory / heap memory limit ",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 25,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "percentunit"
},
"overrides": []
},
"gridPos": {
"h": 7,
"w": 7,
"x": 7,
"y": 8
},
"id": 30,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "multi",
"sort": "none"
}
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"editorMode": "code",
"expr": "(sum by (instance) ({__name__=~\"jvm_memory_used|jvm_memory_used_bytes\",job=~\"$job\",jvm_memory_type=\"heap\", instance=~\"$instance\"}) / on(instance) sum by (instance) ({__name__=~\"jvm_memory_limit|jvm_memory_limit_bytes\",job=~\"$job\",jvm_memory_type=\"heap\", instance=~\"$instance\"}))\nor\n(sum by (instance) ({__name__=~\"process_runtime_jvm_memory_usage|process_runtime_jvm_memory_usage_bytes\",job=~\"$job\",type=\"heap\", instance=~\"$instance\"}) / on(instance) sum by (instance) ({__name__=~\"process_runtime_jvm_memory_limit|process_runtime_jvm_memory_limit_bytes\",job=~\"$job\",type=\"heap\", instance=~\"$instance\"}))\nor\n(sum by (instance) ({__name__=~\"jvm_memory_used|jvm_memory_used_bytes\",job=~\"$job\",area=\"heap\", instance=~\"$instance\"}) / on(instance) sum by (instance) ({__name__=~\"jvm_memory_max|jvm_memory_max_bytes\",job=~\"$job\",area=\"heap\", instance=~\"$instance\"}))",
"legendFormat": "{{instance}}",
"range": true,
"refId": "A"
}
],
"title": "Heap Memory utilization",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"description": "Percentage of time spend for garbage collection pauses",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 25,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"unit": "percentunit"
},
"overrides": []
},
"gridPos": {
"h": 7,
"w": 4,
"x": 0,
"y": 15
},
"id": 46,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"editorMode": "code",
"expr": "(sum by(instance) (rate({__name__=~\"jvm_gc_duration_sum|jvm_gc_duration_seconds_sum|process_runtime_jvm_gc_duration_sum|process_runtime_jvm_gc_duration_seconds_sum|jvm_gc_pause_sum|jvm_gc_pause_seconds_sum\",job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])))\nor\n(sum by(instance) (rate(jvm_gc_pause_milliseconds_sum{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])) / 1000)",
"hide": false,
"legendFormat": "__auto",
"range": true,
"refId": "B"
}
],
"title": "Garbage Collection",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"description": "Number of currently loaded classes",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 25,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "none"
},
"overrides": []
},
"gridPos": {
"h": 7,
"w": 5,
"x": 4,
"y": 15
},
"id": 33,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "multi",
"sort": "none"
}
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"editorMode": "code",
"expr": "{__name__=~\"jvm_class_count|process_runtime_jvm_classes_current_loaded|jvm_classes_loaded\",job=~\"$job\", instance=~\"$instance\"}",
"legendFormat": "{{instance}}",
"range": true,
"refId": "A"
}
],
"title": "Classes",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"description": "Number of currently executing (also called \"live\") threads",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 25,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "none"
},
"overrides": []
},
"gridPos": {
"h": 7,
"w": 5,
"x": 9,
"y": 15
},
"id": 42,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"editorMode": "code",
"expr": "sum({__name__=~\"jvm_thread_count|process_runtime_jvm_threads_count|jvm_threads_live\",job=~\"$job\", instance=~\"$instance\"}) by (instance)",
"legendFormat": "{{instance}}",
"range": true,
"refId": "A"
}
],
"title": "Threads",
"type": "timeseries"
}
],
"refresh": "",
"schemaVersion": 38,
"tags": ["JVM", "open-telemetry", "Java", "otel", "opentelemetry", "otlp"],
"templating": {
"list": [
{
"current": {
"selected": false,
"text": "Prometheus",
"value": "prometheus"
},
"description": "Choose a Prometheus data source",
"hide": 0,
"includeAll": false,
"label": "Data source",
"multi": false,
"name": "datasource",
"options": [],
"query": "prometheus",
"queryValue": "",
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"type": "datasource"
},
{
"allValue": ".+",
"current": {
"selected": false,
"text": "All",
"value": "$__all"
},
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"definition": "label_values({__name__=~\"jvm_class_count|process_runtime_jvm_classes_current_loaded|jvm_classes_loaded\"},job)",
"hide": 0,
"includeAll": true,
"label": "Job",
"multi": true,
"name": "job",
"options": [],
"query": {
"query": "label_values({__name__=~\"jvm_class_count|process_runtime_jvm_classes_current_loaded|jvm_classes_loaded\"},job)",
"refId": "PrometheusVariableQueryEditor-VariableQuery"
},
"refresh": 2,
"regex": "",
"skipUrlSync": false,
"sort": 1,
"tagValuesQuery": "",
"tagsQuery": "",
"type": "query",
"useTags": false
},
{
"allValue": ".+",
"current": {
"selected": false,
"text": "All",
"value": "$__all"
},
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"definition": "label_values({__name__=~\"(jvm_class_count|process_runtime_jvm_classes_current_loaded|jvm_classes_loaded)\", job=~\"$job\"},instance)",
"description": "The instance of the application, e.g. pod1",
"hide": 0,
"includeAll": true,
"label": "Instance",
"multi": true,
"name": "instance",
"options": [],
"query": {
"query": "label_values({__name__=~\"(jvm_class_count|process_runtime_jvm_classes_current_loaded|jvm_classes_loaded)\", job=~\"$job\"},instance)",
"refId": "PrometheusVariableQueryEditor-VariableQuery"
},
"refresh": 2,
"regex": "",
"skipUrlSync": false,
"sort": 1,
"tagValuesQuery": "",
"tagsQuery": "",
"type": "query",
"useTags": false
}
]
},
"time": {
"from": "now-1h",
"to": "now"
},
"timepicker": {
"refresh_intervals": [
"5s",
"10s",
"30s",
"1m",
"5m",
"15m",
"30m",
"1h",
"2h",
"1d"
],
"time_options": ["5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d"]
},
"timezone": "",
"title": "JVM Overview (OpenTelemetry)",
"uid": "b91844d7-121e-4d0a-93b8-a9c1a05703b3",
"version": 1,
"weekStart": ""
}
@@ -0,0 +1,584 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"description": "request rate, error rate, duration",
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"id": 4,
"links": [],
"liveNow": false,
"panels": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"description": "",
"gridPos": {
"h": 5,
"w": 12,
"x": 0,
"y": 0
},
"id": 6,
"options": {
"code": {
"language": "plaintext",
"showLineNumbers": false,
"showMiniMap": false
},
"content": "# RED Metrics: (r)equest rate, (e)rror rate, (d)uration\n\nThis dashboard uses explicit bucket histograms and the stable [OpenTelemetry metrics semantic conventions](https://opentelemetry.io/docs/specs/semconv/general/metrics/).\nTo enable this for the [OpenTelemetry Java instrumentation agent](https://github.com/open-telemetry/opentelemetry-java-instrumentation/), set the following environment variables:\n\n```\nexport OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION=explicit_bucket_histogram\n```",
"mode": "markdown"
},
"pluginVersion": "10.3.3",
"type": "text"
},
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"min": 0,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "reqps",
"unitScale": true
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 5
},
"id": 1,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"editorMode": "code",
"expr": "sum(rate({__name__=~\"http_server_request_duration_seconds_count|http_server_request_duration_count|http_server_duration_milliseconds_count|http_server_duration_seconds_count|http_server_duration_count\", job=~\"$job\", instance=~\"$instance\"}[5m]))",
"legendFormat": "__auto",
"range": true,
"refId": "A"
}
],
"title": "Request Rate",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"min": 0,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "percentunit",
"unitScale": true
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 13
},
"id": 2,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"editorMode": "code",
"expr": "sum(rate({__name__=~\"http_server_request_duration_seconds_count|http_server_request_duration_count|http_server_duration_milliseconds_count|http_server_duration_seconds_count|http_server_duration_count\", job=~\"$job\", instance=~\"$instance\", http_response_status_code=~\"5..\"}[5m])) / sum(rate({__name__=~\"http_server_request_duration_seconds_count|http_server_request_duration_count|http_server_duration_milliseconds_count|http_server_duration_seconds_count|http_server_duration_count\", job=~\"$job\", instance=~\"$instance\"}[5m]))",
"legendFormat": "__auto",
"range": true,
"refId": "A"
}
],
"title": "Error Rate",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"description": "",
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "reqps",
"unitScale": true
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 21
},
"id": 3,
"options": {
"displayMode": "gradient",
"maxVizHeight": 300,
"minVizHeight": 10,
"minVizWidth": 0,
"namePlacement": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": ["lastNotNull"],
"fields": "",
"values": false
},
"showUnfilled": true,
"sizing": "auto",
"valueMode": "color"
},
"pluginVersion": "10.3.3",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"editorMode": "code",
"exemplar": true,
"expr": "sum by (le) (rate({__name__=~\"http_server_request_duration_seconds_bucket|http_server_request_duration_bucket|http_server_duration_milliseconds_bucket|http_server_duration_seconds_bucket|http_server_duration_bucket\", job=~\"$job\", instance=~\"$instance\"}[5m]))",
"format": "heatmap",
"instant": false,
"legendFormat": "{{le}}",
"range": true,
"refId": "A"
}
],
"title": "Duration histogram (s)",
"type": "bargauge"
},
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"fieldConfig": {
"defaults": {
"custom": {
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"scaleDistribution": {
"type": "linear"
}
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 29
},
"id": 5,
"options": {
"calculate": false,
"cellGap": 1,
"color": {
"exponent": 0.5,
"fill": "dark-orange",
"mode": "scheme",
"reverse": false,
"scale": "exponential",
"scheme": "Oranges",
"steps": 64
},
"exemplars": {
"color": "rgba(255,0,255,0.7)"
},
"filterValues": {
"le": 1e-9
},
"legend": {
"show": true
},
"rowsFrame": {
"layout": "auto"
},
"tooltip": {
"show": true,
"yHistogram": false
},
"yAxis": {
"axisPlacement": "left",
"reverse": false,
"unit": "s"
}
},
"pluginVersion": "10.2.0",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"editorMode": "code",
"exemplar": false,
"expr": "sum by (le) (rate({__name__=~\"http_server_request_duration_seconds_bucket|http_server_request_duration_bucket|http_server_duration_milliseconds_bucket|http_server_duration_seconds_bucket|http_server_duration_bucket\", job=~\"$job\", instance=~\"$instance\"}[5m]))",
"format": "heatmap",
"instant": false,
"range": true,
"refId": "A"
}
],
"title": "Duration Heatmap",
"type": "heatmap"
},
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"min": 0,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
},
"unit": "s"
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 37
},
"id": 4,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "9.5.1",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"editorMode": "code",
"exemplar": true,
"expr": "histogram_quantile(0.95, sum by (le) (rate({__name__=~\"http_server_request_duration_seconds_bucket|http_server_request_duration_bucket|http_server_duration_milliseconds_bucket|http_server_duration_seconds_bucket|http_server_duration_bucket\", job=~\"$job\", instance=~\"$instance\"}[5m])))",
"format": "time_series",
"instant": false,
"legendFormat": "95th",
"range": true,
"refId": "A"
},
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"editorMode": "code",
"exemplar": true,
"expr": "histogram_quantile(0.5, sum by (le) (rate({__name__=~\"http_server_request_duration_seconds_bucket|http_server_request_duration_bucket|http_server_duration_milliseconds_bucket|http_server_duration_seconds_bucket|http_server_duration_bucket\", job=~\"$job\", instance=~\"$instance\"}[5m])))",
"hide": false,
"legendFormat": "50th",
"range": true,
"refId": "B"
}
],
"title": "Duration percentiles",
"type": "timeseries"
}
],
"refresh": "",
"schemaVersion": 39,
"tags": [],
"templating": {
"list": [
{
"allValue": ".+",
"current": {
"selected": true,
"text": ["All"],
"value": ["$__all"]
},
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"definition": "label_values(job)",
"hide": 0,
"includeAll": true,
"label": "",
"multi": true,
"name": "job",
"options": [],
"query": {
"query": "label_values(job)",
"refId": "PrometheusVariableQueryEditor-VariableQuery"
},
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 0,
"type": "query"
},
{
"allValue": ".+",
"current": {
"selected": true,
"text": ["All"],
"value": ["$__all"]
},
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"definition": "label_values({job=~\"$job\"},instance)",
"hide": 0,
"includeAll": true,
"label": "instance",
"multi": true,
"name": "instance",
"options": [],
"query": {
"query": "label_values({job=~\"$job\"},instance)",
"refId": "PrometheusVariableQueryEditor-VariableQuery"
},
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 0,
"type": "query"
}
]
},
"time": {
"from": "now-30m",
"to": "now"
},
"timepicker": {},
"timezone": "",
"title": "RED Metrics (classic histogram)",
"uid": "f543a537-cb96-470d-a349-660ad1513136",
"version": 1,
"weekStart": ""
}
@@ -0,0 +1,514 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"description": "request rate, error rate, duration",
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"liveNow": false,
"panels": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"description": "",
"gridPos": {
"h": 5,
"w": 12,
"x": 0,
"y": 0
},
"id": 6,
"options": {
"code": {
"language": "plaintext",
"showLineNumbers": false,
"showMiniMap": false
},
"content": "# RED Metrics: (r)equest rate, (e)rror rate, (d)uration\n\nThis dashboard uses exponential histograms and the stable [OpenTelemetry metrics semantic conventions](https://opentelemetry.io/docs/specs/semconv/general/metrics/).\nTo enable this for the [OpenTelemetry Java instrumentation agent](https://github.com/open-telemetry/opentelemetry-java-instrumentation/), set the following environment variables:\n\n```\nexport OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION=base2_exponential_bucket_histogram\n```",
"mode": "markdown"
},
"pluginVersion": "10.3.3",
"type": "text"
},
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"min": 0,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "reqps",
"unitScale": true
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 5
},
"id": 1,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"editorMode": "code",
"expr": "sum(histogram_count(rate({__name__=~\"http_server_request_duration_seconds|http_server_request_duration|http_server_duration_milliseconds|http_server_duration_seconds|http_server_duration\", job=~\"$job\", instance=~\"$instance\"}[5m])))",
"legendFormat": "__auto",
"range": true,
"refId": "A"
}
],
"title": "Request Rate",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"min": 0,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "percentunit",
"unitScale": true
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 13
},
"id": 2,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"editorMode": "code",
"expr": "sum(histogram_count(rate({__name__=~\"http_server_request_duration_seconds|http_server_request_duration|http_server_duration_milliseconds|http_server_duration_seconds|http_server_duration\", job=~\"$job\", instance=~\"$instance\", http_response_status_code=~\"5..\"}[5m]))) / sum(histogram_count(rate({__name__=~\"http_server_request_duration_seconds|http_server_request_duration|http_server_duration_milliseconds|http_server_duration_seconds|http_server_duration\", job=~\"$job\", instance=~\"$instance\"}[5m])))\n\n",
"legendFormat": "__auto",
"range": true,
"refId": "A"
}
],
"title": "Error Rate",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"fieldConfig": {
"defaults": {
"custom": {
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"scaleDistribution": {
"type": "linear"
}
},
"unitScale": true
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 21
},
"id": 5,
"options": {
"calculate": false,
"cellGap": 1,
"color": {
"exponent": 0.5,
"fill": "dark-orange",
"mode": "scheme",
"reverse": false,
"scale": "exponential",
"scheme": "Oranges",
"steps": 64
},
"exemplars": {
"color": "rgba(255,0,255,0.7)"
},
"filterValues": {
"le": 1e-9
},
"legend": {
"show": true
},
"rowsFrame": {
"layout": "auto"
},
"tooltip": {
"mode": "single",
"showColorScale": false,
"yHistogram": false
},
"yAxis": {
"axisPlacement": "left",
"reverse": false,
"unit": "s"
}
},
"pluginVersion": "10.3.3",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"editorMode": "code",
"exemplar": true,
"expr": "sum(rate({__name__=~\"http_server_request_duration_seconds|http_server_request_duration|http_server_duration_milliseconds|http_server_duration_seconds|http_server_duration\",job=~\"$job\", instance=~\"$instance\"}[5m]))",
"format": "time_series",
"instant": false,
"range": true,
"refId": "A"
}
],
"title": "Duration Heatmap",
"type": "heatmap"
},
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"min": 0,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "s",
"unitScale": true
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 29
},
"id": 4,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "9.5.1",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"editorMode": "code",
"exemplar": true,
"expr": "histogram_quantile(0.95, sum(rate({__name__=~\"http_server_request_duration_seconds|http_server_request_duration|http_server_duration_milliseconds|http_server_duration_seconds|http_server_duration\",job=~\"$job\", instance=~\"$instance\"}[5m])))",
"format": "time_series",
"instant": false,
"legendFormat": "95th",
"range": true,
"refId": "A"
},
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"editorMode": "code",
"exemplar": true,
"expr": "histogram_quantile(0.5, sum(rate({__name__=~\"http_server_request_duration_seconds|http_server_request_duration|http_server_duration_milliseconds|http_server_duration_seconds|http_server_duration\",job=~\"$job\", instance=~\"$instance\"}[5m])))",
"hide": false,
"legendFormat": "50th",
"range": true,
"refId": "B"
}
],
"title": "Duration percentiles",
"type": "timeseries"
}
],
"refresh": "",
"schemaVersion": 39,
"tags": [],
"templating": {
"list": [
{
"allValue": ".+",
"current": {
"selected": true,
"text": ["All"],
"value": ["$__all"]
},
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"definition": "label_values(job)",
"hide": 0,
"includeAll": true,
"label": "",
"multi": true,
"name": "job",
"options": [],
"query": {
"query": "label_values(job)",
"refId": "PrometheusVariableQueryEditor-VariableQuery"
},
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 0,
"type": "query"
},
{
"allValue": ".+",
"current": {
"selected": true,
"text": ["All"],
"value": ["$__all"]
},
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"definition": "label_values({job=~\"$job\"},instance)",
"hide": 0,
"includeAll": true,
"label": "instance",
"multi": true,
"name": "instance",
"options": [],
"query": {
"query": "label_values({job=~\"$job\"},instance)",
"refId": "PrometheusVariableQueryEditor-VariableQuery"
},
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 0,
"type": "query"
}
]
},
"time": {
"from": "now-30m",
"to": "now"
},
"timepicker": {},
"timezone": "",
"title": "RED Metrics (native histogram)",
"uid": "f543a537-cb96-470d-a349-660ad1513135",
"version": 1,
"weekStart": ""
}
+23
View File
@@ -0,0 +1,23 @@
apiVersion: 1
providers:
- name: "RED Metrics (classic histogram)"
type: file
options:
path: /usr/share/grafana/grafana-dashboard-red-metrics-classic.json
foldersFromFilesStructure: false
- name: "RED Metrics (exponential/native histogram)"
type: file
options:
path: /usr/share/grafana/grafana-dashboard-red-metrics-native.json
foldersFromFilesStructure: false
- name: "JVM Metrics"
type: file
options:
path: /usr/share/grafana/grafana-dashboard-jvm-metrics.json
foldersFromFilesStructure: false
- name: "OpenTelemetry Collector HostMetrics (Node Exporter)"
type: file
options:
path: /usr/share/grafana/opentelemetry-collector-hostmetrics-node-exporter.json
foldersFromFilesStructure: false
+52
View File
@@ -0,0 +1,52 @@
apiVersion: 1
datasources:
- name: Mimir
type: prometheus
uid: mimir
url: http://127.0.0.1:9009/prometheus
access: proxy
isDefault: true
editable: true
jsonData:
timeInterval: 60s
exemplarTraceIdDestinations:
- name: trace_id
datasourceUid: tempo
urlDisplayLabel: "Trace: $${__value.raw}"
- name: Tempo
type: tempo
uid: tempo
url: http://127.0.0.1:3200
editable: true
jsonData:
tracesToLogsV2:
customQuery: true
datasourceUid: "loki"
query: '{$${__tags}} | trace_id = "$${__trace.traceId}"'
tags:
- key: "service.name"
value: "service_name"
serviceMap:
datasourceUid: "mimir"
search:
hide: false
nodeGraph:
enabled: true
lokiSearch:
datasourceUid: "loki"
- name: Loki
type: loki
uid: loki
url: http://127.0.0.1:3100
editable: true
jsonData:
derivedFields:
- name: "trace_id"
matcherType: "label"
matcherRegex: "trace_id"
url: "$${__value.raw}"
datasourceUid: "tempo"
urlDisplayLabel: "Trace: $${__value.raw}"
File diff suppressed because it is too large Load Diff
+45
View File
@@ -0,0 +1,45 @@
auth_enabled: false
server:
http_listen_port: 3100
grpc_listen_port: 9097
common:
instance_addr: 127.0.0.1
path_prefix: /data/loki
storage:
filesystem:
chunks_directory: /data/loki/chunks
rules_directory: /data/loki/rules
replication_factor: 1
ring:
kvstore:
store: inmemory
schema_config:
configs:
- from: 2020-10-24
store: tsdb
object_store: filesystem
schema: v13
index:
prefix: index_
period: 24h
ruler:
alertmanager_url: http://127.0.0.1:9093
pattern_ingester:
lifecycler:
min_ready_duration: 1s
ingester:
lifecycler:
min_ready_duration: 1s
frontend:
scheduler_dns_lookup_period: 1s
address: 127.0.0.1:9097
query_scheduler:
use_scheduler_ring: false
+52
View File
@@ -0,0 +1,52 @@
# Mimir monolithic mode configuration for local development.
# Do not use this configuration in production.
activity_tracker:
filepath: /data/mimir/metrics-activity.log
multitenancy_enabled: false
server:
http_listen_port: 9009
log_level: warn
blocks_storage:
backend: filesystem
bucket_store:
sync_dir: /data/mimir/tsdb-sync
filesystem:
dir: /data/mimir/data/tsdb
tsdb:
dir: /data/mimir/tsdb
compactor:
data_dir: /data/mimir/compactor
sharding_ring:
kvstore:
store: memberlist
distributor:
ring:
instance_addr: 127.0.0.1
kvstore:
store: memberlist
ingester:
ring:
instance_addr: 127.0.0.1
kvstore:
store: memberlist
replication_factor: 1
ruler:
rule_path: /data/mimir/ruler
alertmanager_url: http://127.0.0.1:9093
ruler_storage:
backend: filesystem
filesystem:
dir: /data/mimir/rules
store_gateway:
sharding_ring:
replication_factor: 1
File diff suppressed because it is too large Load Diff
+43
View File
@@ -0,0 +1,43 @@
receivers:
otlp:
protocols:
http:
endpoint: 0.0.0.0:4318
extensions:
health_check:
endpoint: 127.0.0.1:13133
path: "/ready"
processors:
batch:
exporters:
otlphttp/metrics:
endpoint: http://127.0.0.1:9009/otlp
tls:
insecure: true
otlphttp/traces:
endpoint: http://127.0.0.1:4418
tls:
insecure: true
otlphttp/logs:
endpoint: http://127.0.0.1:3100/otlp
tls:
insecure: true
service:
extensions: [health_check]
pipelines:
traces:
receivers: [otlp]
processors: [batch]
exporters: [otlphttp/traces]
metrics:
receivers: [otlp]
processors: [batch]
exporters: [otlphttp/metrics]
logs:
receivers: [otlp]
processors: [batch]
exporters: [otlphttp/logs]
+58
View File
@@ -0,0 +1,58 @@
[supervisord]
nodaemon=true
user=root
logfile=/var/log/supervisor/supervisord.log
pidfile=/var/run/supervisord.pid
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
[unix_http_server]
file = /run/supervisord.sock
chmod = 0700
[program:mimir]
command=/usr/bin/mimir -config.file=/etc/mimir/mimir.yaml
autostart=true
autorestart=true
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
[program:loki]
command=/usr/bin/loki -config.file=/etc/loki/loki.yaml
autostart=true
autorestart=true
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
[program:tempo]
command=/usr/bin/tempo -config.file=/etc/tempo/tempo.yaml
autostart=true
autorestart=true
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
[program:otelcol]
command=/usr/local/bin/otelcol-contrib --config=/etc/otelcol/otelcol.yaml
autostart=true
autorestart=true
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
[program:grafana]
directory=/usr/share/grafana
command=/usr/bin/grafana server --homepath=/usr/share/grafana --config=/etc/grafana.ini --homepath=/usr/share/grafana --packaging=docker
autostart=true
autorestart=true
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
+51
View File
@@ -0,0 +1,51 @@
server:
http_listen_port: 3200
grpc_listen_port: 9096
live_store:
shutdown_marker_dir: /data/tempo/live-store/shutdown-marker
wal:
path: /data/tempo/live-store/traces
distributor:
receivers:
otlp:
protocols:
grpc:
endpoint: "127.0.0.1:4417"
http:
endpoint: "127.0.0.1:4418"
memberlist:
bind_addr: [127.0.0.1]
bind_port: 7947
querier:
frontend_worker:
frontend_address: 127.0.0.1:9096
storage:
trace:
backend: local
wal:
path: /data/tempo/wal
local:
path: /data/tempo/blocks
metrics_generator:
processor:
span_metrics:
dimensions:
- service_name
- operation
- status_code
storage:
path: /data/tempo/generator/wal
remote_write:
- url: http://127.0.0.1:9009/api/v1/write
send_exemplars: true
overrides:
defaults:
metrics_generator:
processors: [service-graphs, span-metrics]
+2 -2
View File
@@ -1,10 +1,10 @@
ARG PG_VERSION=18.3 ALPINE_VERSION=3.23 ARG PG_VERSION=18.5 ALPINE_VERSION=3.24
FROM postgres:${PG_VERSION}-alpine${ALPINE_VERSION} AS build FROM postgres:${PG_VERSION}-alpine${ALPINE_VERSION} AS build
ARG PGVECTOR_VERSION ARG PGVECTOR_VERSION
WORKDIR / WORKDIR /
RUN apk update RUN apk update
RUN apk add gcc make musl-dev clang19 llvm19 git RUN apk add gcc make musl-dev clang21 llvm21 git
RUN git clone --branch v${PGVECTOR_VERSION} https://github.com/pgvector/pgvector.git pgvector RUN git clone --branch v${PGVECTOR_VERSION} https://github.com/pgvector/pgvector.git pgvector
WORKDIR pgvector WORKDIR pgvector
RUN make RUN make
+4 -4
View File
@@ -39,8 +39,8 @@ FROM busybox:musl AS sslocal
COPY --from=builder --chown=root:root /home/luser/shadowsocks-rust/target/release/sslocal /usr/bin/ COPY --from=builder --chown=root:root /home/luser/shadowsocks-rust/target/release/sslocal /usr/bin/
COPY --from=builder --chown=root:root /home/luser/shadowsocks-rust/examples/config.json /etc/shadowsocks-rust/ COPY --from=builder --chown=root:root /home/luser/shadowsocks-rust/examples/config.json /etc/shadowsocks-rust/
COPY --from=builder --chown=root:root /home/luser/shadowsocks-rust/docker/docker-entrypoint.sh /usr/bin/ COPY --from=builder --chown=root:root /home/luser/shadowsocks-rust/docker/docker-entrypoint.sh /usr/bin/
COPY --from=builder --chown=root:root /tmp/v2ray-plugin /usr/bin/v2ray-plugin COPY --from=builder --chown=root:root --chmod=755 /tmp/v2ray-plugin /usr/bin/v2ray-plugin
COPY --from=builder --chown=root:root /tmp/xray-plugin /usr/bin/xray-plugin COPY --from=builder --chown=root:root --chmod=755 /tmp/xray-plugin /usr/bin/xray-plugin
ENTRYPOINT [ "docker-entrypoint.sh" ] ENTRYPOINT [ "docker-entrypoint.sh" ]
CMD [ "sslocal", "--log-without-time", "-c", "/etc/shadowsocks-rust/config.json" ] CMD [ "sslocal", "--log-without-time", "-c", "/etc/shadowsocks-rust/config.json" ]
@@ -50,8 +50,8 @@ FROM busybox:musl AS ssserver
COPY --from=builder --chown=root:root /home/luser/shadowsocks-rust/target/release/ssserver /usr/bin/ COPY --from=builder --chown=root:root /home/luser/shadowsocks-rust/target/release/ssserver /usr/bin/
COPY --from=builder --chown=root:root /home/luser/shadowsocks-rust/examples/config.json /etc/shadowsocks-rust/ COPY --from=builder --chown=root:root /home/luser/shadowsocks-rust/examples/config.json /etc/shadowsocks-rust/
COPY --from=builder --chown=root:root /home/luser/shadowsocks-rust/docker/docker-entrypoint.sh /usr/bin/ COPY --from=builder --chown=root:root /home/luser/shadowsocks-rust/docker/docker-entrypoint.sh /usr/bin/
COPY --from=builder /tmp/v2ray-plugin /usr/bin/v2ray-plugin COPY --from=builder --chown=root:root --chmod=755 /tmp/v2ray-plugin /usr/bin/v2ray-plugin
COPY --from=builder /tmp/xray-plugin /usr/bin/xray-plugin COPY --from=builder --chown=root:root --chmod=755 /tmp/xray-plugin /usr/bin/xray-plugin
ENTRYPOINT [ "docker-entrypoint.sh" ] ENTRYPOINT [ "docker-entrypoint.sh" ]
+7 -7
View File
@@ -1,25 +1,25 @@
#!/usr/bin/env sh #!/usr/bin/env sh
set -e
TARGETPLATFORM=$1 TARGETPLATFORM=$1
PLUGIN_VERSION=1.8.24 PLUGIN_VERSION=1.260327.0
mkdir /tmp/xray_plugin.d mkdir /tmp/xray_plugin.d
cd /tmp/xray_plugin.d cd /tmp/xray_plugin.d
case "$TARGETPLATFORM" in case "$TARGETPLATFORM" in
"linux/386") "linux/386")
url="https://gitea.woggioni.net/api/packages/woggioni/generic/xray-plugin-386-linux/1.8.24/xray-plugin-linux-386-v1.8.24.tar.gz" url="https://gitea.woggioni.net/api/packages/woggioni/generic/shadowsocks-xray-plugin/${PLUGIN_VERSION}/shadowsocks-xray-plugin-linux-i386"
;; ;;
"linux/amd64") "linux/amd64")
url="https://gitea.woggioni.net/api/packages/woggioni/generic/xray-plugin-amd64-linux/1.8.24/xray-plugin-linux-amd64-v1.8.24.tar.gz" url="https://gitea.woggioni.net/api/packages/woggioni/generic/shadowsocks-xray-plugin/${PLUGIN_VERSION}/shadowsocks-xray-plugin-linux-x86_64"
;; ;;
"linux/arm64") "linux/arm64")
url="https://gitea.woggioni.net/api/packages/woggioni/generic/xray-plugin-arm64-linux/1.8.24/xray-plugin-linux-arm64-v1.8.24.tar.gz" url="https://gitea.woggioni.net/api/packages/woggioni/generic/shadowsocks-xray-plugin/${PLUGIN_VERSION}/shadowsocks-xray-plugin-linux-aarch64"
;; ;;
"linux/arm/v7") "linux/arm/v7")
url="https://gitea.woggioni.net/api/packages/woggioni/generic/xray-plugin-arm-linux/1.8.24/xray-plugin-linux-arm-v1.8.24.tar.gz" url="https://gitea.woggioni.net/api/packages/woggioni/generic/shadowsocks-xray-plugin/${PLUGIN_VERSION}/shadowsocks-xray-plugin-linux-armv7h"
;; ;;
*) *)
echo "Doesn't support $TARGETPLATFORM architecture" echo "Doesn't support $TARGETPLATFORM architecture"
exit 1 exit 1
;; ;;
esac esac
curl --retry 3 "$url" | tar -xvz curl --fail -L --retry 3 "$url" -o /tmp/xray-plugin
mv xray-plugin* /tmp/xray-plugin
+5
View File
@@ -0,0 +1,5 @@
ARG VERSION
FROM matrixdotorg/synapse:v${VERSION}
USER root
RUN python -m pip install synapse-s3-storage-provider
USER 1000