From 16691d74fe839fac9d6f084982bae710ce98a934 Mon Sep 17 00:00:00 2001 From: jordan Date: Fri, 30 Jan 2026 00:04:59 +0000 Subject: [PATCH] Initialize project from astro-landing template --- .claude/CLAUDE.md | 49 ++++++++++++++++++++++++++++++++++++++++ .woodpecker.yml | 36 +++++++++++++++++++++++++++++ Dockerfile | 20 ++++++++++++++++ README.md | 32 ++++++++++++++++++++++++++ astro.config.mjs | 7 ++++++ nginx.conf | 27 ++++++++++++++++++++++ package.json | 18 +++++++++++++++ src/layouts/Layout.astro | 21 +++++++++++++++++ src/pages/index.astro | 33 +++++++++++++++++++++++++++ tailwind.config.mjs | 8 +++++++ 10 files changed, 251 insertions(+) create mode 100644 .claude/CLAUDE.md create mode 100644 .woodpecker.yml create mode 100644 Dockerfile create mode 100644 README.md create mode 100644 astro.config.mjs create mode 100644 nginx.conf create mode 100644 package.json create mode 100644 src/layouts/Layout.astro create mode 100644 src/pages/index.astro create mode 100644 tailwind.config.mjs diff --git a/.claude/CLAUDE.md b/.claude/CLAUDE.md new file mode 100644 index 0000000..d29a8b5 --- /dev/null +++ b/.claude/CLAUDE.md @@ -0,0 +1,49 @@ +# e2e-final-1498 + +Astro landing page deployed to 5zukvg9r.threesix.ai. + +## Development + +```bash +npm install +npm run dev +``` + +Visit http://localhost:4321 to see the site. + +## Build + +```bash +npm run build +``` + +Output in `dist/` - static HTML/CSS/JS. + +## Deployment + +Pushes to `main` auto-deploy via Woodpecker CI: +1. Install dependencies +2. Build static site +3. Build Docker image (nginx serving dist/) +4. Push to registry +5. Update K8s deployment + +Live at: https://5zukvg9r.threesix.ai + +## Constraints + +- Use Astro components, minimize client JS +- Optimize images (use Astro Image) +- Keep Lighthouse score > 90 +- Tailwind for styling + +## File Structure + +``` +src/ + pages/ + index.astro # Main landing page + components/ # Reusable Astro components + layouts/ # Page layouts +public/ # Static assets +``` diff --git a/.woodpecker.yml b/.woodpecker.yml new file mode 100644 index 0000000..dc584c3 --- /dev/null +++ b/.woodpecker.yml @@ -0,0 +1,36 @@ +steps: + install: + image: node:20-alpine + commands: + - npm install + when: + - event: [push, pull_request] + + build: + image: node:20-alpine + commands: + - npm run build + when: + - event: [push, pull_request] + + docker: + image: woodpeckerci/plugin-kaniko + settings: + registry: registry.threesix.ai + repo: "e2e-final-1498" + tags: + - latest + - ${CI_COMMIT_SHA:0:8} + cache: true + skip-tls-verify: true + when: + - event: push + branch: main + + deploy: + image: bitnami/kubectl:latest + commands: + - kubectl set image deployment/e2e-final-1498 e2e-final-1498=registry.threesix.ai/e2e-final-1498:${CI_COMMIT_SHA:0:8} -n projects + when: + - event: push + branch: main diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..b830d38 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,20 @@ +# Build stage +FROM node:20-alpine AS build + +WORKDIR /app + +COPY package*.json ./ +RUN npm install + +COPY . . +RUN npm run build + +# Production stage +FROM nginx:alpine + +COPY --from=build /app/dist /usr/share/nginx/html +COPY nginx.conf /etc/nginx/conf.d/default.conf + +EXPOSE 80 + +CMD ["nginx", "-g", "daemon off;"] diff --git a/README.md b/README.md new file mode 100644 index 0000000..f0d43e1 --- /dev/null +++ b/README.md @@ -0,0 +1,32 @@ +# e2e-final-1498 + +Astro landing page deployed at: https://5zukvg9r.threesix.ai + +## Getting Started + +```bash +npm install +npm run dev +``` + +## Commands + +| Command | Action | +|---------|--------| +| `npm run dev` | Start dev server at localhost:4321 | +| `npm run build` | Build for production | +| `npm run preview` | Preview production build | + +## Structure + +``` +src/ + pages/ # File-based routing + components/ # Astro/React components + layouts/ # Page layouts +public/ # Static assets +``` + +## CI/CD + +Pushes to `main` trigger automatic deployment via Woodpecker CI. diff --git a/astro.config.mjs b/astro.config.mjs new file mode 100644 index 0000000..50a4e80 --- /dev/null +++ b/astro.config.mjs @@ -0,0 +1,7 @@ +import { defineConfig } from 'astro/config'; +import tailwind from '@astrojs/tailwind'; + +export default defineConfig({ + integrations: [tailwind()], + output: 'static', +}); diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..038c0fa --- /dev/null +++ b/nginx.conf @@ -0,0 +1,27 @@ +server { + listen 80; + server_name localhost; + root /usr/share/nginx/html; + index index.html; + + # Gzip compression + gzip on; + gzip_types text/plain text/css application/json application/javascript text/xml application/xml; + + # Cache static assets + location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2)$ { + expires 1y; + add_header Cache-Control "public, immutable"; + } + + # SPA fallback + location / { + try_files $uri $uri/ /index.html; + } + + # Health check + location /health { + return 200 'ok'; + add_header Content-Type text/plain; + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..2838ad7 --- /dev/null +++ b/package.json @@ -0,0 +1,18 @@ +{ + "name": "e2e-final-1498", + "type": "module", + "version": "0.0.1", + "scripts": { + "dev": "astro dev", + "start": "astro dev", + "build": "astro build", + "preview": "astro preview" + }, + "dependencies": { + "astro": "^4.0.0" + }, + "devDependencies": { + "@astrojs/tailwind": "^5.0.0", + "tailwindcss": "^3.4.0" + } +} diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro new file mode 100644 index 0000000..059d3bb --- /dev/null +++ b/src/layouts/Layout.astro @@ -0,0 +1,21 @@ +--- +interface Props { + title: string; +} + +const { title } = Astro.props; +--- + + + + + + + + + {title} + + + + + diff --git a/src/pages/index.astro b/src/pages/index.astro new file mode 100644 index 0000000..7d48a4b --- /dev/null +++ b/src/pages/index.astro @@ -0,0 +1,33 @@ +--- +import Layout from '../layouts/Layout.astro'; +--- + + +
+
+
+

+ e2e-final-1498 +

+

+ Welcome to your new Astro landing page. Edit this file at + src/pages/index.astro +

+ +
+
+
+
diff --git a/tailwind.config.mjs b/tailwind.config.mjs new file mode 100644 index 0000000..83cac5e --- /dev/null +++ b/tailwind.config.mjs @@ -0,0 +1,8 @@ +/** @type {import('tailwindcss').Config} */ +export default { + content: ['./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}'], + theme: { + extend: {}, + }, + plugins: [], +};