diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..6f26ae3 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,23 @@ +# Stage 1: Build the Astro Site +FROM node:20-alpine AS builder + +WORKDIR /app + +# Install dependencies strictly +COPY package*.json ./ +RUN npm ci + +# Copy source files and build the production static files +COPY . . +RUN npm run build + +# Stage 2: Serve with Nginx for lightning fast delivery and low memory footprint +FROM nginx:alpine + +# Copy the generated static files from the build stage into Nginx +COPY --from=builder /app/dist /usr/share/nginx/html + +# Add custom nginx config if we ever need advanced routing, otherwise default works flawlessly for SSG +EXPOSE 80 + +CMD ["nginx", "-g", "daemon off;"] diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..cece7ff --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,12 @@ +version: '3.8' + +services: + production-frontend: + build: + context: . + dockerfile: Dockerfile + container_name: notjustan-agency-frontend + restart: unless-stopped + # Depending on Coolify's proxy configuration, exposing port 80 allows Traefik/Caddy to automatically route domain traffic + ports: + - "80" diff --git a/src/components/ContactForm.tsx b/src/components/forms/ContactForm.tsx similarity index 100% rename from src/components/ContactForm.tsx rename to src/components/forms/ContactForm.tsx diff --git a/src/components/ApproachSection.tsx b/src/components/sections/ApproachSection.tsx similarity index 100% rename from src/components/ApproachSection.tsx rename to src/components/sections/ApproachSection.tsx diff --git a/src/components/BrandAwarenessSection.tsx b/src/components/sections/BrandAwarenessSection.tsx similarity index 100% rename from src/components/BrandAwarenessSection.tsx rename to src/components/sections/BrandAwarenessSection.tsx diff --git a/src/components/BusinessStagesSection.tsx b/src/components/sections/BusinessStagesSection.tsx similarity index 100% rename from src/components/BusinessStagesSection.tsx rename to src/components/sections/BusinessStagesSection.tsx diff --git a/src/components/FooterSection.tsx b/src/components/sections/FooterSection.tsx similarity index 100% rename from src/components/FooterSection.tsx rename to src/components/sections/FooterSection.tsx diff --git a/src/components/HeroSection.tsx b/src/components/sections/HeroSection.tsx similarity index 99% rename from src/components/HeroSection.tsx rename to src/components/sections/HeroSection.tsx index 2b73226..a820590 100644 --- a/src/components/HeroSection.tsx +++ b/src/components/sections/HeroSection.tsx @@ -1,7 +1,7 @@ import React, { useEffect, useRef } from 'react'; import { gsap } from 'gsap'; import { ArrowRight } from 'lucide-react'; -import LiveClock from './LiveClock'; +import LiveClock from '../ui/LiveClock'; // Hardcoded paths fetched from Simple Icons (to guarantee visibility) const logoPaths = { diff --git a/src/components/InsightsSection.tsx b/src/components/sections/InsightsSection.tsx similarity index 100% rename from src/components/InsightsSection.tsx rename to src/components/sections/InsightsSection.tsx diff --git a/src/components/OfferSection.tsx b/src/components/sections/OfferSection.tsx similarity index 100% rename from src/components/OfferSection.tsx rename to src/components/sections/OfferSection.tsx diff --git a/src/components/PerformanceMarketingSection.tsx b/src/components/sections/PerformanceMarketingSection.tsx similarity index 100% rename from src/components/PerformanceMarketingSection.tsx rename to src/components/sections/PerformanceMarketingSection.tsx diff --git a/src/components/ServicesSection.tsx b/src/components/sections/ServicesSection.tsx similarity index 100% rename from src/components/ServicesSection.tsx rename to src/components/sections/ServicesSection.tsx diff --git a/src/components/StrategySection.tsx b/src/components/sections/StrategySection.tsx similarity index 100% rename from src/components/StrategySection.tsx rename to src/components/sections/StrategySection.tsx diff --git a/src/components/LiveClock.tsx b/src/components/ui/LiveClock.tsx similarity index 100% rename from src/components/LiveClock.tsx rename to src/components/ui/LiveClock.tsx diff --git a/src/components/LoadingScreen.tsx b/src/components/ui/LoadingScreen.tsx similarity index 100% rename from src/components/LoadingScreen.tsx rename to src/components/ui/LoadingScreen.tsx diff --git a/src/pages/index.astro b/src/pages/index.astro index f4d1aa0..5322c86 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -1,17 +1,17 @@ --- import Layout from '../layouts/Layout.astro'; -import LoadingScreen from '../components/LoadingScreen'; -import HeroSection from '../components/HeroSection'; -import ApproachSection from '../components/ApproachSection'; -import ServicesSection from '../components/ServicesSection'; -import InsightsSection from '../components/InsightsSection'; -import BusinessStagesSection from '../components/BusinessStagesSection'; -import StrategySection from '../components/StrategySection'; -import BrandAwarenessSection from '../components/BrandAwarenessSection'; -import PerformanceMarketingSection from '../components/PerformanceMarketingSection'; -import OfferSection from '../components/OfferSection'; -import ContactForm from '../components/ContactForm'; -import FooterSection from '../components/FooterSection'; +import LoadingScreen from '../components/ui/LoadingScreen'; +import HeroSection from '../components/sections/HeroSection'; +import ApproachSection from '../components/sections/ApproachSection'; +import ServicesSection from '../components/sections/ServicesSection'; +import InsightsSection from '../components/sections/InsightsSection'; +import BusinessStagesSection from '../components/sections/BusinessStagesSection'; +import StrategySection from '../components/sections/StrategySection'; +import BrandAwarenessSection from '../components/sections/BrandAwarenessSection'; +import PerformanceMarketingSection from '../components/sections/PerformanceMarketingSection'; +import OfferSection from '../components/sections/OfferSection'; +import ContactForm from '../components/forms/ContactForm'; +import FooterSection from '../components/sections/FooterSection'; ---