File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ node_modules
2+ dist
3+ build
4+ .git
5+ .env
6+ docker-compose.yml
7+ Dockerfile
Original file line number Diff line number Diff line change 1+ FROM node:24.14.0-alpine
2+
3+ WORKDIR /app
4+ COPY package*.json ./
5+ RUN npm ci
6+ COPY . .
7+ EXPOSE 5173
8+
9+ CMD ["npm" , "run" , "dev" ]
Original file line number Diff line number Diff line change @@ -50,7 +50,9 @@ node -v
5050npm -v
5151```
5252
53- ### Installation
53+ If you plan to use Docker, ensure you have [ Docker Desktop] ( https://www.docker.com/products/docker-desktop/ ) installed.
54+
55+ ### Local Installation
5456
55571 . Clone the repository and navigate into the project directory:
5658
@@ -74,10 +76,35 @@ npm run dev
7476
7577By default, Vite serves the app on localhost (usually ` http://localhost:5173 ` ).
7678
77- To expose the app on your local network:
79+ ### Docker Installation
80+
81+ If you prefer an isolated containerized environment, you can use our Docker Compose setup.
82+
83+ 1 . Clone the repository and navigate into the project directory:
84+
85+ ``` bash
86+ git clone https://github.com/Project-CARPI/site.git
87+ cd site
88+ ```
89+
90+ 2 . Build the image and spin up the container:
91+
92+ ``` bash
93+ docker compose up --build
94+ ```
95+
96+ To run the container in detached mode (in the background), append the -d flag:
97+
98+ ``` bash
99+ docker compose up -d
100+ ```
101+
102+ The app will now be accessible at ` http://localhost:5173 ` (or the port specified in your docker compose configuration).
103+
104+ To stop the container, run:
78105
79106``` bash
80- npm run dev -- --host
107+ docker compose down
81108```
82109
83110### Available Scripts
@@ -137,6 +164,7 @@ npm run preview
137164- [ @dnd-kit ] ( https://dndkit.com/ )
138165- [ Framer Motion] ( https://www.framer.com/motion/ )
139166- [ Zod] ( https://zod.dev/ )
167+ - [ Docker] ( https://www.docker.com/ )
140168
141169## Contributing
142170
Original file line number Diff line number Diff line change 1+ services :
2+ web :
3+ build : .
4+ image : carpi-dev:latest
5+
6+ # expose port 5173
7+ ports :
8+ - " 5173:5173"
9+
10+ # mount the current directory to /app in the container
11+ volumes :
12+ - .:/app
13+ - /app/node_modules
14+
15+ # interactive terminal
16+ stdin_open : true
17+ tty : true
Original file line number Diff line number Diff line change 88 "npm" : " ~11.12.0"
99 },
1010 "scripts" : {
11- "dev" : " vite" ,
11+ "dev" : " vite --host " ,
1212 "build" : " tsc -b && vite build" ,
1313 "lint" : " eslint ." ,
1414 "preview" : " vite preview" ,
You can’t perform that action at this time.
0 commit comments