Compare commits
6 Commits
dbddcc40a2
...
trunk
| Author | SHA1 | Date | |
|---|---|---|---|
| 3cbc7dd529 | |||
| 2eeff8adc5 | |||
| f3c1d76ae5 | |||
| c4b8f19d6a | |||
| 555773e2e9 | |||
| f38d7885f2 |
@@ -5,8 +5,8 @@ on:
|
||||
branches: [trunk]
|
||||
|
||||
jobs:
|
||||
build-and-push-prod:
|
||||
name: Build & Push (Prod)
|
||||
build-and-push:
|
||||
name: Build & Push
|
||||
runs-on: heavy
|
||||
container: git.batida.io/batida/ci-node:latest
|
||||
steps:
|
||||
@@ -23,24 +23,10 @@ jobs:
|
||||
docker push git.batida.io/batida/batida-landing:${{ github.sha }}
|
||||
docker push git.batida.io/batida/batida-landing:latest
|
||||
|
||||
deploy-staging:
|
||||
name: Deploy Staging
|
||||
runs-on: heavy
|
||||
needs: [build-and-push-prod]
|
||||
container: git.batida.io/batida/ci-node:latest
|
||||
steps:
|
||||
- name: Deploy to staging
|
||||
run: |
|
||||
echo "$KUBECONFIG_CONTENT" > /tmp/kubeconfig
|
||||
kubectl --kubeconfig /tmp/kubeconfig set image deployment/batida-landing batida-landing=git.batida.io/batida/batida-landing:${{ github.sha }} -n staging
|
||||
kubectl --kubeconfig /tmp/kubeconfig rollout status deployment/batida-landing -n staging --timeout=120s
|
||||
env:
|
||||
KUBECONFIG_CONTENT: ${{ secrets.KUBECONFIG }}
|
||||
|
||||
deploy-prod:
|
||||
name: Deploy Prod
|
||||
runs-on: heavy
|
||||
needs: [deploy-staging]
|
||||
needs: [build-and-push]
|
||||
container: git.batida.io/batida/ci-node:latest
|
||||
steps:
|
||||
- name: Deploy to prod
|
||||
|
||||
@@ -8,3 +8,4 @@ package-lock.json
|
||||
.env
|
||||
.env.*
|
||||
!.env.*.example
|
||||
rust_out
|
||||
|
||||
+1
-1
@@ -45,6 +45,6 @@ COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
USER nginx-user
|
||||
|
||||
EXPOSE 80
|
||||
EXPOSE 8080
|
||||
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
"""Generate OG image and favicon for Batida landing page."""
|
||||
from PIL import Image, ImageDraw, ImageFont
|
||||
|
||||
# OG Image (1200x630)
|
||||
W, H = 1200, 630
|
||||
img = Image.new("RGB", (W, H), "#0C0C0F")
|
||||
draw = ImageDraw.Draw(img)
|
||||
|
||||
# Orange accent bar at top
|
||||
draw.rectangle([0, 0, W, 6], fill="#F97316")
|
||||
|
||||
# Logo square (orange B)
|
||||
logo_size = 120
|
||||
logo_x, logo_y = 80, 180
|
||||
draw.rounded_rectangle([logo_x, logo_y, logo_x + logo_size, logo_y + logo_size], radius=24, fill="#F97316")
|
||||
try:
|
||||
font_bold = ImageFont.truetype("/System/Library/Fonts/Helvetica.ttc", 72)
|
||||
font_title = ImageFont.truetype("/System/Library/Fonts/Helvetica.ttc", 64)
|
||||
font_sub = ImageFont.truetype("/System/Library/Fonts/Helvetica.ttc", 28)
|
||||
font_tag = ImageFont.truetype("/System/Library/Fonts/Helvetica.ttc", 22)
|
||||
except Exception:
|
||||
font_bold = ImageFont.load_default()
|
||||
font_title = ImageFont.load_default()
|
||||
font_sub = ImageFont.load_default()
|
||||
font_tag = ImageFont.load_default()
|
||||
|
||||
# B letter in logo
|
||||
bbox = draw.textbbox((0, 0), "B", font=font_bold)
|
||||
bw, bh = bbox[2] - bbox[0], bbox[3] - bbox[1]
|
||||
draw.text((logo_x + (logo_size - bw) / 2, logo_y + (logo_size - bh) / 2 - 8), "B", fill="white", font=font_bold)
|
||||
|
||||
# Title
|
||||
draw.text((240, 185), "Batida", fill="#FAFAFA", font=font_title)
|
||||
|
||||
# Tagline
|
||||
draw.text((240, 270), "Manage Incidents. Keep Your Cool.", fill="#6B6B80", font=font_sub)
|
||||
|
||||
# Bottom tagline
|
||||
draw.text((80, 460), "Intelligent incident management for DevOps teams.", fill="#4A4A5A", font=font_tag)
|
||||
draw.text((80, 495), "pagerduty alternative • open core • self-hosted or cloud", fill="#3A3A4A", font=font_tag)
|
||||
|
||||
# CTA button
|
||||
btn_x, btn_y, btn_w, btn_h = 80, 550, 200, 44
|
||||
draw.rounded_rectangle([btn_x, btn_y, btn_x + btn_w, btn_y + btn_h], radius=8, fill="#F97316")
|
||||
bbox = draw.textbbox((0, 0), "Get Started", font=font_tag)
|
||||
tw = bbox[2] - bbox[0]
|
||||
draw.text((btn_x + (btn_w - tw) / 2, btn_y + 10), "Get Started", fill="white", font=font_tag)
|
||||
|
||||
# URL
|
||||
draw.text((960, 580), "batida.io", fill="#3A3A4A", font=font_tag)
|
||||
|
||||
img.save("/Users/kakarotto/codes/personal/batida/batida-landing/og-image.png", "PNG")
|
||||
print("OG image created: og-image.png")
|
||||
|
||||
# Favicon PNG (32x32)
|
||||
fav = Image.new("RGBA", (32, 32), (0, 0, 0, 0))
|
||||
fav_draw = ImageDraw.Draw(fav)
|
||||
fav_draw.rounded_rectangle([0, 0, 32, 32], radius=8, fill="#F97316")
|
||||
try:
|
||||
fav_font = ImageFont.truetype("/System/Library/Fonts/Helvetica.ttc", 20)
|
||||
except Exception:
|
||||
fav_font = ImageFont.load_default()
|
||||
bbox = fav_draw.textbbox((0, 0), "B", font=fav_font)
|
||||
bw, bh = bbox[2] - bbox[0], bbox[3] - bbox[1]
|
||||
fav_draw.text(((32 - bw) / 2, (32 - bh) / 2 - 2), "B", fill="white", font=fav_font)
|
||||
fav.save("/Users/kakarotto/codes/personal/batida/batida-landing/favicon.png", "PNG")
|
||||
print("Favicon created: favicon.png")
|
||||
+3
-3
@@ -24,11 +24,11 @@ spec:
|
||||
- name: batida-landing
|
||||
image: git.batida.io/batida/batida-landing:latest
|
||||
ports:
|
||||
- containerPort: 80
|
||||
- containerPort: 8080
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: 80
|
||||
port: 8080
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 30
|
||||
resources:
|
||||
@@ -49,4 +49,4 @@ spec:
|
||||
app: batida-landing
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 80
|
||||
targetPort: 8080
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
server {
|
||||
listen 80;
|
||||
listen 8080;
|
||||
server_name _;
|
||||
root /usr/share/nginx/html;
|
||||
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
|
||||
<rect width="32" height="32" rx="8" fill="#F97316"/>
|
||||
<text x="16" y="23" font-family="Arial,sans-serif" font-size="20" font-weight="bold" fill="white" text-anchor="middle">B</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 253 B |
Reference in New Issue
Block a user