-
/server
: Backend Express app
-
/client
: Frontend React-Vite app
-
/docker
: Docker config and compose files
FROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
EXPOSE 5000
CMD [ "npm", "run", "dev" ]
FROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
EXPOSE 5173
CMD ["npm", "run", "dev"]
version: '3'
services:
backend:
build: ./server
ports:
- "5000:5000"
volumes:
- ./server:/app
environment:
- MONGO_URI=mongodb://mongo:27017/ieeeapp
frontend:
build: ./client
ports:
- "5173:5173"
volumes:
- ./client:/app
mongo:
image: mongo
ports:
- "27017:27017"
- Containers are automatically rebuilt on code changes with volumes.
- Environment variables should be handled securely via
.env
files or Docker secrets in production.