Skip to content

Commit 32a8766

Browse files
committed
feat: final changes before public
1 parent 38d45bc commit 32a8766

23 files changed

Lines changed: 939 additions & 222 deletions
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: Build and Push Cinder Image
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
paths:
8+
- "apps/cinder/**"
9+
- "packages/stratus/**"
10+
- "packages/types/**"
11+
- "package.json"
12+
- "bun.lock"
13+
- ".github/workflows/cinder-docker.yml"
14+
workflow_dispatch:
15+
16+
env:
17+
REGISTRY: ghcr.io
18+
IMAGE_NAME: ${{ github.repository_owner }}/cinder
19+
20+
jobs:
21+
build-and-push:
22+
runs-on: ubuntu-latest
23+
permissions:
24+
contents: read
25+
packages: write
26+
27+
steps:
28+
- name: Checkout repository
29+
uses: actions/checkout@v6
30+
31+
- name: Set up Docker Buildx
32+
uses: docker/setup-buildx-action@v4
33+
34+
- name: Log in to GitHub Container Registry
35+
uses: docker/login-action@v4
36+
with:
37+
registry: ${{ env.REGISTRY }}
38+
username: ${{ github.actor }}
39+
password: ${{ secrets.GITHUB_TOKEN }}
40+
41+
- name: Extract metadata for Docker
42+
id: meta
43+
uses: docker/metadata-action@v6
44+
with:
45+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
46+
tags: |
47+
type=ref,event=branch
48+
type=sha,prefix={{branch}}-
49+
type=raw,value=latest,enable={{is_default_branch}}
50+
51+
- name: Build and push Docker image
52+
uses: docker/build-push-action@v7
53+
with:
54+
context: .
55+
file: ./apps/cinder/Dockerfile
56+
platforms: linux/amd64
57+
push: true
58+
provenance: false
59+
tags: ${{ steps.meta.outputs.tags }}
60+
labels: ${{ steps.meta.outputs.labels }}
61+
cache-from: type=gha
62+
cache-to: type=gha,mode=max
63+
64+
cleanup:
65+
needs: build-and-push
66+
runs-on: ubuntu-latest
67+
permissions:
68+
packages: write
69+
70+
steps:
71+
- name: Delete old image versions, keep the two newest
72+
uses: actions/delete-package-versions@v5
73+
with:
74+
package-name: cinder
75+
package-type: container
76+
min-versions-to-keep: 2
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: Build and Push Influx Image
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
paths:
8+
- "apps/influx/**"
9+
- "packages/stratus/**"
10+
- "packages/types/**"
11+
- "package.json"
12+
- "bun.lock"
13+
- ".github/workflows/influx-docker.yml"
14+
workflow_dispatch:
15+
16+
env:
17+
REGISTRY: ghcr.io
18+
IMAGE_NAME: ${{ github.repository_owner }}/influx
19+
20+
jobs:
21+
build-and-push:
22+
runs-on: ubuntu-latest
23+
permissions:
24+
contents: read
25+
packages: write
26+
27+
steps:
28+
- name: Checkout repository
29+
uses: actions/checkout@v6
30+
31+
- name: Set up Docker Buildx
32+
uses: docker/setup-buildx-action@v4
33+
34+
- name: Log in to GitHub Container Registry
35+
uses: docker/login-action@v4
36+
with:
37+
registry: ${{ env.REGISTRY }}
38+
username: ${{ github.actor }}
39+
password: ${{ secrets.GITHUB_TOKEN }}
40+
41+
- name: Extract metadata for Docker
42+
id: meta
43+
uses: docker/metadata-action@v6
44+
with:
45+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
46+
tags: |
47+
type=ref,event=branch
48+
type=sha,prefix={{branch}}-
49+
type=raw,value=latest,enable={{is_default_branch}}
50+
51+
- name: Build and push Docker image
52+
uses: docker/build-push-action@v7
53+
with:
54+
context: .
55+
file: ./apps/influx/Dockerfile
56+
platforms: linux/amd64
57+
push: true
58+
provenance: false
59+
tags: ${{ steps.meta.outputs.tags }}
60+
labels: ${{ steps.meta.outputs.labels }}
61+
cache-from: type=gha
62+
cache-to: type=gha,mode=max
63+
64+
cleanup:
65+
needs: build-and-push
66+
runs-on: ubuntu-latest
67+
permissions:
68+
packages: write
69+
70+
steps:
71+
- name: Delete old image versions, keep the two newest
72+
uses: actions/delete-package-versions@v5
73+
with:
74+
package-name: influx
75+
package-type: container
76+
min-versions-to-keep: 2
Lines changed: 24 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build and Push Meridian Docker Image
1+
name: Build and Push Meridian Image
22

33
on:
44
push:
@@ -7,17 +7,21 @@ on:
77
paths:
88
- "apps/meridian/**"
99
- "packages/**"
10+
- "package.json"
11+
- "bun.lock"
1012
- ".github/workflows/meridian-docker.yml"
1113
workflow_dispatch:
1214

1315
env:
14-
IMAGE_NAME: nonplay/meridian
16+
REGISTRY: ghcr.io
17+
IMAGE_NAME: ${{ github.repository_owner }}/meridian
1518

1619
jobs:
1720
build-and-push:
1821
runs-on: ubuntu-latest
1922
permissions:
2023
contents: read
24+
packages: write
2125

2226
steps:
2327
- name: Checkout repository
@@ -26,17 +30,18 @@ jobs:
2630
- name: Set up Docker Buildx
2731
uses: docker/setup-buildx-action@v4
2832

29-
- name: Log in to Docker Hub
33+
- name: Log in to GitHub Container Registry
3034
uses: docker/login-action@v4
3135
with:
32-
username: ${{ secrets.DOCKERHUB_USERNAME }}
33-
password: ${{ secrets.DOCKERHUB_TOKEN }}
36+
registry: ${{ env.REGISTRY }}
37+
username: ${{ github.actor }}
38+
password: ${{ secrets.GITHUB_TOKEN }}
3439

3540
- name: Extract metadata for Docker
3641
id: meta
3742
uses: docker/metadata-action@v6
3843
with:
39-
images: ${{ env.IMAGE_NAME }}
44+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
4045
tags: |
4146
type=ref,event=branch
4247
type=sha,prefix={{branch}}-
@@ -49,40 +54,22 @@ jobs:
4954
file: ./apps/meridian/Dockerfile
5055
platforms: linux/amd64
5156
push: true
57+
provenance: false
5258
tags: ${{ steps.meta.outputs.tags }}
5359
labels: ${{ steps.meta.outputs.labels }}
5460
cache-from: type=gha
5561
cache-to: type=gha,mode=max
5662

57-
- name: Clean up old Docker Hub tags
58-
env:
59-
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
60-
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
61-
run: |
62-
TOKEN=$(curl -s -X POST \
63-
'https://hub.docker.com/v2/users/login' \
64-
-H 'Content-Type: application/json' \
65-
-d "{\"username\": \"${DOCKERHUB_USERNAME}\", \"password\": \"${DOCKERHUB_TOKEN}\"}" \
66-
| jq -r '.token')
67-
68-
TAGS_TO_DELETE=$(curl -s \
69-
-H "Authorization: JWT ${TOKEN}" \
70-
"https://hub.docker.com/v2/repositories/${{ env.IMAGE_NAME }}/tags?page_size=100&ordering=-last_updated" \
71-
| jq -r '[.results[] | select(.name | test("^master-[a-f0-9]+$"))] | sort_by(.last_updated) | reverse | .[2:] | .[].name')
72-
73-
for tag in $TAGS_TO_DELETE; do
74-
echo "Deleting tag: $tag"
75-
curl -s -X DELETE \
76-
-H "Authorization: JWT ${TOKEN}" \
77-
"https://hub.docker.com/v2/repositories/${{ env.IMAGE_NAME }}/tags/${tag}/"
78-
done
63+
cleanup:
64+
needs: build-and-push
65+
runs-on: ubuntu-latest
66+
permissions:
67+
packages: write
7968

80-
- name: Trigger Dokploy Deployment
81-
run: |
82-
curl -X POST \
83-
'${{ secrets.DOKPLOY_DOMAIN }}/api/application.deploy' \
84-
-H 'accept: application/json' \
85-
-H 'x-api-key: ${{ secrets.DOKPLOY_API_KEY }}' \
86-
-H 'Content-Type: application/json' \
87-
-H 'X-Internal-Token: ${{ secrets.CF_BYPASS_TOKEN }}' \
88-
-d '{"applicationId": "${{ secrets.MERIDIAN_APPLICATION_ID }}"}'
69+
steps:
70+
- name: Delete old image versions, keep the two newest
71+
uses: actions/delete-package-versions@v5
72+
with:
73+
package-name: meridian
74+
package-type: container
75+
min-versions-to-keep: 2

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ Thumbs.db
4646
.nitro
4747
.cache
4848

49-
.turbo
5049
target
5150
generated
5251
.env

CLAUDE.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
This is the BX Team monorepo — it contains all BX Team projects, both frontend and backend. When entering a project, either to edit or analyse, you should read it's CLAUDE.md.
44

55
## Architecture
6-
- **Monorepo tooling:** [Turborepo](https://turbo.build) (`turbo.json`) + [bun workspaces](https://bun.sh/docs/pm/workspaces) (`package.json` with `workspaces` field)
6+
- **Monorepo tooling:** [bun workspaces](https://bun.sh/docs/pm/workspaces) (`package.json` with `workspaces` field). Run scripts across packages with `bun run --filter '<pattern>' <script>`.
77
- **Frontend:** Vue 3 / Nuxt 4, Tailwind CSS v4
8-
- **Backend:** Hono (Ingest API), Nuxt Nitro (Downloads API, Auth, Pulsify API), Postgres, Clickhouse
9-
- **Indentation:** Use TAB everywhere, never spaces
8+
- **Backend:** Hono (Ingest API), Nuxt Nitro (Downloads API, Auth, Pulsify API), BullMQ worker (cinder), Postgres, Clickhouse, Redis
9+
- **Formatting:** [Biome](https://biomejs.dev) is the source of truth — 2-space indent for TS/JS/JSON and standalone CSS. Tabs are used only inside `.vue` `<template>` and `<style>` blocks (Biome doesn't reformat those). Run `bunx biome check .` before committing.
1010

1111
### Apps (`apps/`)
1212
| App | Description |

0 commit comments

Comments
 (0)