Skip to content

Commit 5884399

Browse files
authored
Benchmarks website revamped (#6215)
Keeps the old benchmarks website for now because Cloudflare pages serves the static page on develop. This is safe to merge and once merged, it will publish a docker image to GHCR (`ghcr.io/vortex-data/vortex/benchmarks-website:latest`). The VM hosting the website listens to changes with Watchtower and will update itself when there is a new image version. - [ ] This PR gets merged, docker image is created - [ ] Update EC2 to start fetching from new repo - [ ] Update DNS records to point to the EC2 - [ ] Kill Cloudflare Pages - [ ] Cleanup v1 website's code --------- Signed-off-by: Baris Palaska <[email protected]>
1 parent 44d39e3 commit 5884399

32 files changed

+6557
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Publish Benchmarks Website
2+
3+
on:
4+
push:
5+
branches: [develop]
6+
paths:
7+
- "benchmarks-website-v2/**"
8+
9+
jobs:
10+
publish:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
14+
packages: write
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: Log in to GHCR
19+
uses: docker/login-action@v3
20+
with:
21+
registry: ghcr.io
22+
username: ${{ github.actor }}
23+
password: ${{ secrets.GITHUB_TOKEN }}
24+
25+
- name: Set up QEMU
26+
uses: docker/setup-qemu-action@v3
27+
28+
- name: Set up Docker Buildx
29+
uses: docker/setup-buildx-action@v3
30+
31+
- name: Build and push
32+
uses: docker/build-push-action@v6
33+
with:
34+
context: ./benchmarks-website-v2
35+
platforms: linux/arm64
36+
push: true
37+
tags: ghcr.io/${{ github.repository }}/benchmarks-website:latest

REUSE.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ path = "benchmarks-website/**"
1717
SPDX-FileCopyrightText = "Copyright the Vortex contributors"
1818
SPDX-License-Identifier = "CC-BY-4.0"
1919

20+
[[annotations]]
21+
path = "benchmarks-website-v2/**"
22+
SPDX-FileCopyrightText = "Copyright the Vortex contributors"
23+
SPDX-License-Identifier = "CC-BY-4.0"
24+
2025
# Golden files are licensed under CC-BY-4.0.
2126
[[annotations]]
2227
path = "**/goldenfiles/**"
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules
2+
dist
3+
.git

benchmarks-website-v2/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
dist

benchmarks-website-v2/Dockerfile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
FROM node:24-alpine AS build
2+
WORKDIR /app
3+
COPY package.json package-lock.json ./
4+
RUN npm ci
5+
COPY . .
6+
RUN npm run build
7+
8+
FROM node:24-alpine
9+
WORKDIR /app
10+
COPY package.json package-lock.json ./
11+
RUN npm ci --omit=dev
12+
COPY --from=build /app/dist ./dist
13+
COPY server.js .
14+
EXPOSE 3000
15+
CMD ["node", "server.js"]
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
services:
2+
benchmarks-website:
3+
image: ghcr.io/vortex-data/vortex/benchmarks-website:latest
4+
ports:
5+
- "80:3000"
6+
restart: unless-stopped
7+
8+
watchtower:
9+
image: containrrr/watchtower
10+
volumes:
11+
- /var/run/docker.sock:/var/run/docker.sock
12+
environment:
13+
- WATCHTOWER_POLL_INTERVAL=60
14+
- WATCHTOWER_CLEANUP=true
15+
restart: unless-stopped

benchmarks-website-v2/ec2-init.txt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
1. Install Docker
2+
# Amazon Linux 2023
3+
sudo yum install -y docker
4+
sudo systemctl enable --now docker
5+
sudo usermod -aG docker $USER
6+
newgrp docker
7+
8+
2. Install Docker Compose plugin
9+
sudo mkdir -p /usr/local/lib/docker/cli-plugins
10+
sudo curl -SL https://github.com/docker/compose/releases/latest/download/docker-compose-linux-aarch64 -o /usr/local/lib/docker/cli-plugins/docker-compose
11+
sudo chmod +x /usr/local/lib/docker/cli-plugins/docker-compose
12+
13+
3. Set up and start the app
14+
sudo mkdir -p /opt/benchmarks-website
15+
sudo cp docker-compose.yml /opt/benchmarks-website/
16+
cd /opt/benchmarks-website
17+
docker compose up -d

benchmarks-website-v2/index.html

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<title>Vortex Benchmarks</title>
7+
8+
<!-- Preconnect to font services -->
9+
<link rel="preconnect" href="https://fonts.googleapis.com" />
10+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
11+
12+
<!-- Web Fonts -->
13+
<link
14+
href="https://fonts.googleapis.com/css2?family=Funnel+Display:wght@300;400;500;600;700;800&display=swap"
15+
rel="stylesheet"
16+
/>
17+
<link
18+
rel="stylesheet"
19+
href="https://unpkg.com/[email protected]/dist/fonts/geist-sans/style.css"
20+
/>
21+
<link
22+
rel="stylesheet"
23+
href="https://unpkg.com/[email protected]/dist/fonts/geist-mono/style.css"
24+
/>
25+
26+
<!-- Favicons -->
27+
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
28+
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
29+
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
30+
<link rel="manifest" href="/site.webmanifest" />
31+
</head>
32+
<body>
33+
<div id="root"></div>
34+
<script type="module" src="/src/main.jsx"></script>
35+
</body>
36+
</html>

0 commit comments

Comments
 (0)