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
18 changes: 18 additions & 0 deletions client/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM node:20-alpine as development

WORKDIR /app

# Copy package files
COPY package*.json ./

# Install dependencies
RUN npm ci

# Copy source code
COPY . .

# Expose port
EXPOSE 5173

# Start development server
CMD ["npm", "run", "dev"]
32 changes: 32 additions & 0 deletions compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,36 @@
services:
client:
build:
context: ./client
dockerfile: Dockerfile
ports:
- "5173:5173"
volumes:
- ./client:/app
- /app/node_modules
environment:
- VITE_API_URL=http://localhost:8007
depends_on:
- server
server:
build:
context: ./server
dockerfile: Dockerfile
ports:
- "8007:8007"
volumes:
- ./server:/app
- /app/node_modules
environment:
- NODE_ENV=development
- PORT=8007
- MONGODB_URI=mongodb://nm-mongo:27017/note_manager
- CORS_ORIGIN=http://localhost:5173
- AI_SERVICE_URL=ai-service-url
- AI_API_KEY=ai-api-key
depends_on:
- nm-mongo

nm-mongo:
healthcheck:
test: echo 'db.runCommand("ping").ok' | mongosh localhost:27017/test --quiet
Expand Down
20 changes: 20 additions & 0 deletions server/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Development stage
FROM node:20-alpine as development

WORKDIR /app


# Copy package files
COPY package*.json ./

# Install dependencies
RUN npm ci

# Copy source code
COPY . .

# Expose port
EXPOSE 8000

# Start development server
CMD ["npm", "run", "dev"]