Spaces:
Sleeping
Sleeping
| # Use official Node.js lightweight image | |
| FROM node:18-alpine | |
| # Set working directory | |
| WORKDIR /app | |
| # Install git and clone your repository | |
| RUN apk add --no-cache git && \ | |
| git clone https://github.com/charan200415/omni-tools.git . | |
| # Install dependencies | |
| RUN npm install | |
| # Create vite.config.js dynamically to allow external access | |
| RUN echo "import { defineConfig } from 'vite'; \ | |
| export default defineConfig({ \ | |
| server: { \ | |
| host: '0.0.0.0', \ | |
| port: 8080, \ | |
| allowedHosts: ['charan5775-testingtools.hf.space', 'localhost'] \ | |
| } \ | |
| });" > vite.config.js | |
| # Expose port 8080 | |
| EXPOSE 8080 | |
| # Set environment variables | |
| ENV HOST=0.0.0.0 | |
| ENV PORT=8080 | |
| # Run Vite dev server | |
| CMD ["npm", "run", "dev", "--", "--host", "0.0.0.0", "--port", "8080"] |