diff --git a/Dockerfile b/Dockerfile index cddfb9f..7ab1fc5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,20 +1,37 @@ # Build stage -FROM node:18-alpine as build +FROM --platform=linux/amd64 node:18-alpine as build ARG NODE_ENV=production ENV NODE_ENV=${NODE_ENV} WORKDIR /app + +# System dependencies with enhanced build tools +RUN apk add --no-cache python3 make g++ curl git libc6-compat + +# Clean and prepare npm +RUN npm cache clean --force +RUN npm install -g npm@latest + +# Install dependencies with matching versions COPY package*.json ./ -RUN npm ci +RUN npm ci --no-optional --platform=linux --arch=x64 --libc=musl RUN npm install -g typescript -RUN npm install --save-dev @types/react-dom @types/vite @vitejs/plugin-react +RUN npm install --save-dev @types/react-dom +RUN npm install @rollup/rollup-linux-x64-musl +RUN npm install esbuild@0.21.5 + +# Copy source code and build COPY . . RUN npm run build -# Production stage +# Production stage with Nginx FROM nginx:alpine COPY --from=build /app/dist /usr/share/nginx/html COPY nginx.conf /etc/nginx/conf.d/default.conf + +# Health check for container monitoring HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \ CMD curl -f http://localhost/ || exit 1 + +# Expose port and start Nginx EXPOSE 80 CMD ["nginx", "-g", "daemon off;"] diff --git a/package.json b/package.json index 2fb63c7..778d6bd 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "type": "module", "scripts": { "dev": "vite", - "build": "tsc -b && vite build", + "build": "ROLLUP_SKIP_NODE_RESOLVE=true tsc -b && vite build", "lint": "eslint .", "preview": "vite preview" }, diff --git a/src/pages/About.tsx b/src/pages/About.tsx index 067014e..2236c74 100644 --- a/src/pages/About.tsx +++ b/src/pages/About.tsx @@ -4,7 +4,7 @@ import { FaGraduationCap, FaAward, FaHandsHelping } from 'react-icons/fa' import SnowPeaks from '../components/SnowPeaks' const About = () => { - const [ref, inView] = useInView({ + const { ref, inView } = useInView({ triggerOnce: true, threshold: 0.1, }) @@ -105,10 +105,13 @@ const About = () => { {/* Vision Section */}
-
+

Our Vision

@@ -122,4 +125,4 @@ const About = () => { ) } -export default About \ No newline at end of file +export default About diff --git a/src/pages/Contact.tsx b/src/pages/Contact.tsx index 0e6656d..781f14a 100644 --- a/src/pages/Contact.tsx +++ b/src/pages/Contact.tsx @@ -1,6 +1,6 @@ import { useState } from 'react' import { motion } from 'framer-motion' -import { FaEnvelope, FaMapMarkerAlt, FaClock } from 'react-icons/fa' +import { FaEnvelope, FaMapMarkerAlt } from 'react-icons/fa' const Contact = () => { const [formData, setFormData] = useState({ diff --git a/src/pages/Home.tsx b/src/pages/Home.tsx index 3d17ac2..aa040be 100644 --- a/src/pages/Home.tsx +++ b/src/pages/Home.tsx @@ -1,18 +1,12 @@ import { motion } from 'framer-motion' import { useInView } from 'react-intersection-observer' -import { useNavigate } from 'react-router-dom' const Home = () => { - const navigate = useNavigate() const [ref, inView] = useInView({ triggerOnce: true, threshold: 0.1, }) - const handleLearnMore = () => { - navigate('/services') - } - return (
{/* Hero Section */} @@ -41,7 +35,9 @@ const Home = () => {

-
{/* Mission Statement Section */} + + + {/* Mission Statement Section */} { ) } -export default Home \ No newline at end of file +export default Home diff --git a/src/pages/Services.tsx b/src/pages/Services.tsx index ac2b428..5b63f1b 100644 --- a/src/pages/Services.tsx +++ b/src/pages/Services.tsx @@ -5,9 +5,25 @@ import { FaFileAlt, FaGlobe, FaUsers, FaChalkboardTeacher, FaTimes, FaMapMarkerA const geoUrl = "https://cdn.jsdelivr.net/npm/us-atlas@3/states-10m.json" -const relationshipPoints = [ +type Coordinates = [number, number] + +interface Event { + name: string + description: string + startDate: string + endDate: string +} + +interface RelationshipPoint { + coordinates: Coordinates + city: string + state: string + events: Event[] +} + +const relationshipPoints: RelationshipPoint[] = [ { - coordinates: [-106.6504, 35.0844], + coordinates: [-106.6504, 35.0844] as Coordinates, city: "Albuquerque", state: "New Mexico", events: [{ @@ -18,7 +34,7 @@ const relationshipPoints = [ }] }, { - coordinates: [-80.8431, 35.2271], + coordinates: [-80.8431, 35.2271] as Coordinates, city: "Charlotte", state: "North Carolina", events: [{ @@ -29,7 +45,7 @@ const relationshipPoints = [ }] }, { - coordinates: [-104.9903, 39.7392], + coordinates: [-104.9903, 39.7392] as Coordinates, city: "Denver", state: "Colorado", events: [ @@ -48,7 +64,7 @@ const relationshipPoints = [ ] }, { - coordinates: [-84.3879, 33.7490], + coordinates: [-84.3879, 33.7490] as Coordinates, city: "Atlanta", state: "Georgia", events: [{ @@ -59,7 +75,7 @@ const relationshipPoints = [ }] }, { - coordinates: [-93.2650, 44.9778], + coordinates: [-93.2650, 44.9778] as Coordinates, city: "Minneapolis", state: "Minnesota", events: [{ @@ -70,7 +86,7 @@ const relationshipPoints = [ }] }, { - coordinates: [-87.6298, 41.8781], + coordinates: [-87.6298, 41.8781] as Coordinates, city: "Chicago", state: "Illinois", events: [{ @@ -81,7 +97,7 @@ const relationshipPoints = [ }] }, { - coordinates: [-98.4936, 29.4241], + coordinates: [-98.4936, 29.4241] as Coordinates, city: "San Antonio", state: "Texas", events: [{ @@ -92,7 +108,7 @@ const relationshipPoints = [ }] }, { - coordinates: [-89.4012, 43.0731], + coordinates: [-89.4012, 43.0731] as Coordinates, city: "Madison", state: "Wisconsin", events: [{ @@ -103,7 +119,7 @@ const relationshipPoints = [ }] }, { - coordinates: [-94.8191, 38.8814], + coordinates: [-94.8191, 38.8814] as Coordinates, city: "Olathe", state: "Kansas", events: [{ @@ -114,7 +130,7 @@ const relationshipPoints = [ }] }, { - coordinates: [-115.1398, 36.1699], + coordinates: [-115.1398, 36.1699] as Coordinates, city: "Las Vegas", state: "Nevada", events: [{