Initialize project from astro-landing template
This commit is contained in:
commit
16691d74fe
49
.claude/CLAUDE.md
Normal file
49
.claude/CLAUDE.md
Normal file
@ -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
|
||||||
|
```
|
||||||
36
.woodpecker.yml
Normal file
36
.woodpecker.yml
Normal file
@ -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
|
||||||
20
Dockerfile
Normal file
20
Dockerfile
Normal file
@ -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;"]
|
||||||
32
README.md
Normal file
32
README.md
Normal file
@ -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.
|
||||||
7
astro.config.mjs
Normal file
7
astro.config.mjs
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
import { defineConfig } from 'astro/config';
|
||||||
|
import tailwind from '@astrojs/tailwind';
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
integrations: [tailwind()],
|
||||||
|
output: 'static',
|
||||||
|
});
|
||||||
27
nginx.conf
Normal file
27
nginx.conf
Normal file
@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
18
package.json
Normal file
18
package.json
Normal file
@ -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"
|
||||||
|
}
|
||||||
|
}
|
||||||
21
src/layouts/Layout.astro
Normal file
21
src/layouts/Layout.astro
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
---
|
||||||
|
interface Props {
|
||||||
|
title: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
const { title } = Astro.props;
|
||||||
|
---
|
||||||
|
|
||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<meta name="description" content="e2e-final-1498 - Built with Astro" />
|
||||||
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
||||||
|
<title>{title}</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<slot />
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
33
src/pages/index.astro
Normal file
33
src/pages/index.astro
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
---
|
||||||
|
import Layout from '../layouts/Layout.astro';
|
||||||
|
---
|
||||||
|
|
||||||
|
<Layout title="e2e-final-1498">
|
||||||
|
<main class="min-h-screen bg-gradient-to-br from-slate-900 to-slate-800">
|
||||||
|
<div class="container mx-auto px-4 py-16">
|
||||||
|
<div class="text-center">
|
||||||
|
<h1 class="text-5xl font-bold text-white mb-6">
|
||||||
|
e2e-final-1498
|
||||||
|
</h1>
|
||||||
|
<p class="text-xl text-slate-300 mb-8 max-w-2xl mx-auto">
|
||||||
|
Welcome to your new Astro landing page. Edit this file at
|
||||||
|
<code class="bg-slate-700 px-2 py-1 rounded">src/pages/index.astro</code>
|
||||||
|
</p>
|
||||||
|
<div class="flex gap-4 justify-center">
|
||||||
|
<a
|
||||||
|
href="https://docs.astro.build"
|
||||||
|
class="px-6 py-3 bg-purple-600 text-white rounded-lg hover:bg-purple-700 transition"
|
||||||
|
>
|
||||||
|
Read the Docs
|
||||||
|
</a>
|
||||||
|
<a
|
||||||
|
href="https://git.threesix.ai/jordan/e2e-final-1498.git"
|
||||||
|
class="px-6 py-3 bg-slate-700 text-white rounded-lg hover:bg-slate-600 transition"
|
||||||
|
>
|
||||||
|
View Source
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
</Layout>
|
||||||
8
tailwind.config.mjs
Normal file
8
tailwind.config.mjs
Normal file
@ -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: [],
|
||||||
|
};
|
||||||
Loading…
Reference in New Issue
Block a user