diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..00e5445 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,25 @@ +# Use official Node.js image +FROM node:20 + +# Set working directory +WORKDIR /app + +# Copy only package.json and package-lock.json for install step +COPY package.json ./ +# If you have a package-lock.json or pnpm-lock.yaml/yarn.lock, copy it as well +# COPY package-lock.json ./ + +# Install dependencies +RUN npm install + +# Now copy the rest of the app +COPY . . + +# Expose the Vite dev server port +EXPOSE 5173 + +# Set environment variable if desired (can be overridden in compose) +ENV HOST=0.0.0.0 + +# Default command runs Vite dev server +CMD ["npm", "run", "dev", "--", "--host", "0.0.0.0"] \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..e69de29 diff --git a/vite.config.ts b/vite.config.ts index be7d086..fe7577d 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -3,5 +3,10 @@ import react from '@vitejs/plugin-react' import tailwind from '@tailwindcss/vite' export default defineConfig({ + server: { + host: '0.0.0.0', // or 'my.local.dev' + port: 5173, + strictPort: true + }, plugins: [react(), tailwind()], }) \ No newline at end of file