Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions client/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
node_modules
.git
.gitignore
.env
.env.local
.env.development
.env.test
.env.production
.DS_Store
npm-debug.log
dist
build
.vscode
.idea
coverage
11 changes: 11 additions & 0 deletions client/Dockerfile.client
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM node:20-alpine

WORKDIR /app/client

COPY package*.json ./
RUN npm install

COPY . .

EXPOSE 5173
CMD [ "npm", "run", "dev", "--", "--host" ]
3 changes: 2 additions & 1 deletion client/src/pages/HomePage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
XIcon,
OfficeBuildingIcon,
PlusCircleIcon,
ChartBarIcon
} from "@heroicons/react/outline";

import { Link, Outlet, useNavigate } from "react-router-dom";
Expand Down Expand Up @@ -52,7 +53,7 @@ export default function Example() {
current: true,
},
{ name: "History", to: "history", icon: FolderIcon, current: false },
// { name: "Reports", to: "reports", icon: ChartBarIcon, current: false },
{ name: "Reports", to: "reports", icon: ChartBarIcon, current: false },
{
name: "Addresses",
to: "addresses",
Expand Down
24 changes: 24 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
version: '3.8'

services:
client:
build:
context: ./client
dockerfile: Dockerfile.client
ports:
- "5173:5173"
volumes:
- ./client:/app/client
- /app/client/node_modules
environment:
- VITE_API_URL=http://server:6005 # Adjust this URL as needed

server:
build:
context: ./server
dockerfile: Dockerfile.server
ports:
- "6005:6005"
volumes:
- ./server:/app/server
- /app/server/node_modules
5 changes: 5 additions & 0 deletions server/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules
.git
.gitignore
.env
*.log
15 changes: 15 additions & 0 deletions server/Dockerfile.server
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM node:20-alpine

WORKDIR /app/server

# Install nodemon globally
RUN npm install -g nodemon

COPY package*.json ./
RUN npm install

COPY . .

EXPOSE 1573

CMD [ "nodemon", "app.js" ]
3 changes: 3 additions & 0 deletions server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,8 @@
"mongoose": "^8.3.3",
"passport": "^0.7.0",
"passport-google-oauth20": "^2.0.0"
},
"scripts": {
"dev": "nodemon app.js"
}
}