Spaces:
Sleeping
Sleeping
File size: 757 Bytes
5549d8e 63afdb6 2b4c9e3 ab86cc7 63afdb6 5549d8e 63afdb6 5549d8e 63afdb6 5549d8e 2b4c9e3 40c7b15 ab86cc7 5549d8e 2b4c9e3 5549d8e | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | # 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"] |