Skip to content

Commit 15f5ee2

Browse files
feat: dockerized the whole project, single command run available now
1 parent deb2d1f commit 15f5ee2

File tree

4 files changed

+33
-0
lines changed

4 files changed

+33
-0
lines changed

.dockerignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
node_modules
2+
dist
3+
.git
4+
.gitignore
5+
README.md

Dockerfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
FROM node:22-alpine
2+
3+
WORKDIR /app
4+
COPY package*.json ./
5+
RUN npm install
6+
COPY . .
7+
EXPOSE 5173
8+
CMD ["npm", "run", "dev"]

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,17 @@ Step through **state transitions** and **table updates** interactively to unders
162162
git clone https://github.com/<your-username>/Algo-Visualizer.git
163163
cd Algo-Visualizer
164164
```
165+
## 🐳 Run with Docker
165166

167+
Make sure **Docker** is installed and running on your system.
168+
You don’t need to install **Node.js** or any dependencies manually — Docker handles everything.
169+
170+
To start the development server, run:
171+
172+
```bash
173+
docker compose up
174+
```
175+
Then open http://localhost:5173 in your browser to view the app.
166176
### 2️⃣ Install Dependencies
167177
```bash
168178
npm install

docker-compose.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
services:
2+
algo-visualizer:
3+
build: .
4+
container_name: algo-visualizer-dev
5+
ports:
6+
- "5173:5173"
7+
volumes:
8+
- .:/app
9+
- /app/node_modules
10+
command: ["npm", "run", "dev", "--", "--host"]

0 commit comments

Comments
 (0)