Upload files to "/"

This commit is contained in:
maq
2025-11-03 09:06:09 -08:00
commit 5f2948d4ac
5 changed files with 143 additions and 0 deletions

5
Dockerfile Normal file
View File

@@ -0,0 +1,5 @@
FROM node:18-alpine
WORKDIR /app
COPY . .
RUN npm install && npm run build
CMD ["npm", "run", "preview"]

79
docker-compose.yml Normal file
View File

@@ -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

13
index.html Normal file
View File

@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>NoCap W.Y.A.</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>

24
package.json Normal file
View File

@@ -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"
}
}

22
tailwind.config.ts Normal file
View File

@@ -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'),
],
}