From 5f2948d4ac1f9b4e588fb0dc566373ebba93b906 Mon Sep 17 00:00:00 2001 From: maq Date: Mon, 3 Nov 2025 09:06:09 -0800 Subject: [PATCH] Upload files to "/" --- Dockerfile | 5 +++ docker-compose.yml | 79 ++++++++++++++++++++++++++++++++++++++++++++++ index.html | 13 ++++++++ package.json | 24 ++++++++++++++ tailwind.config.ts | 22 +++++++++++++ 5 files changed, 143 insertions(+) create mode 100644 Dockerfile create mode 100644 docker-compose.yml create mode 100644 index.html create mode 100644 package.json create mode 100644 tailwind.config.ts diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..0745212 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,5 @@ +FROM node:18-alpine +WORKDIR /app +COPY . . +RUN npm install && npm run build +CMD ["npm", "run", "preview"] diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..48bee52 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,79 @@ +version: "3.9" +name: nocapwya +services: + db: + image: postgis/postgis:16-3.5 + container_name: nocapwya-db + environment: + POSTGRES_DB: wya + POSTGRES_USER: wya + POSTGRES_PASSWORD: wya + volumes: + - pg_data:/var/lib/postgresql/data + - ./backend/app/init.sql:/docker-entrypoint-initdb.d/init.sql + restart: unless-stopped + healthcheck: + test: ["CMD-SHELL", "pg_isready -U wya -d wya"] + interval: 10s + timeout: 5s + retries: 10 + networks: + - nocap_net + + backend: + build: + context: ./backend + dockerfile: Dockerfile + container_name: nocapwya-backend + command: uvicorn app.main:app --host 0.0.0.0 --port 8000 + working_dir: /app + ports: + - "8000:8000" + volumes: + - ./backend:/app + - ./data:/data + depends_on: + db: + condition: service_healthy + env_file: + - .env + environment: + - PYTHONUNBUFFERED=1 + restart: unless-stopped + healthcheck: + test: ["CMD-SHELL", "curl -fsS http://localhost:8000/ || exit 1"] + interval: 10s + timeout: 3s + retries: 10 + networks: + - nocap_net + + frontend: + build: + context: ./frontend + dockerfile: Dockerfile + container_name: nocapwya-frontend + command: sh -c "npm run preview -- --host 0.0.0.0 --port 4173" + working_dir: /app + ports: + - "4173:4173" + volumes: + - ./frontend:/app + - ./data/tiles:/app/dist/tiles:ro + environment: + - VITE_API_URL=http://backend:8000 + depends_on: + backend: + condition: service_started + restart: unless-stopped + networks: + - nocap_net + +volumes: + pg_data: + +networks: + nocap_net: + driver: bridge + + diff --git a/index.html b/index.html new file mode 100644 index 0000000..19cc5ce --- /dev/null +++ b/index.html @@ -0,0 +1,13 @@ + + + + + + + NoCap W.Y.A. + + +
+ + + \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..95e1bf1 --- /dev/null +++ b/package.json @@ -0,0 +1,24 @@ +{ + "name": "nocap-wya", + "version": "1.1.0", + "scripts": { + "dev": "vite", + "build": "vite build", + "preview": "vite preview" + }, + "dependencies": { + "react": "^18.2.0", + "react-dom": "^18.2.0", + "mapbox-gl": "^2.15.0", + "react-map-gl": "^7.1.0", + "zustand": "^4.0.0", + "framer-motion": "^10.0.0", + "lucide-react": "^0.263.0", + "date-fns": "^2.30.0" + }, + "devDependencies": { + "@vitejs/plugin-react": "^4.0.0", + "tailwindcss": "^3.3.0", + "vite": "^4.0.0" + } +} diff --git a/tailwind.config.ts b/tailwind.config.ts new file mode 100644 index 0000000..32fed7d --- /dev/null +++ b/tailwind.config.ts @@ -0,0 +1,22 @@ +module.exports = { + darkMode: ['class'], + content: [ + './src/**/*.{js,ts,jsx,tsx}', + ], + theme: { + extend: { + animation: { + 'fade-in': 'fadeIn 0.2s ease-in-out', + }, + keyframes: { + fadeIn: { + '0%': { opacity: '0', transform: 'scale(0.95)' }, + '100%': { opacity: '1', transform: 'scale(1)' }, + }, + }, + }, + }, + plugins: [ + require('tailwindcss-animate'), + ], +}