Dockerfile

This commit is contained in:
Piyush Agarwal 2025-02-01 21:39:28 +05:30
parent ae2dfd82d1
commit 1c5da13c78
4 changed files with 32 additions and 1 deletions

1
.dockerignore Normal file
View File

@ -0,0 +1 @@
node_modules

13
Dockerfile Normal file
View File

@ -0,0 +1,13 @@
FROM node:20-alpine
WORKDIR /app
COPY package*.json .
RUN npm install
COPY . .
EXPOSE 5173
CMD [ "npm","run","dev" ]

17
docker-compose.yml Normal file
View File

@ -0,0 +1,17 @@
version: "3.8"
services:
frontend:
build:
context: .
dockerfile: Dockerfile
ports:
- "5173:5173"
volumes:
- .:/app
- /app/node_modules
env_file:
- .env

View File

@ -4,7 +4,7 @@
"version": "0.0.0", "version": "0.0.0",
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite --host 0.0.0.0",
"build": "tsc -b && vite build", "build": "tsc -b && vite build",
"lint": "eslint .", "lint": "eslint .",
"preview": "vite preview" "preview": "vite preview"