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
Binary file added .DS_Store
Binary file not shown.
20 changes: 20 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Use the official Node.js image
FROM node:18-alpine

# Set the working directory inside the container
WORKDIR /app

# Copy package.json and package-lock.json
COPY package*.json ./

# Install dependencies
RUN npm install

# Copy the rest of the application files
COPY . .

# Expose the application port
EXPOSE 5000

# Start the application
CMD ["node", "server.js"]
25 changes: 25 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
version: '3.8'

services:
app:
build:
context: .
dockerfile: Dockerfile
ports:
- "5001:5000" # Map host port 5001 to container port 5000
environment:
- PORT=5000
- MONGO_URI=mongodb://db:27017/aitend-database # MongoDB connection string
depends_on:
- db # Wait for the database service to start

db:
image: mongo:6
container_name: mongodb
ports:
- "27017:27017" # Expose MongoDB's default port
volumes:
- mongo-data:/data/db # Persist MongoDB data

volumes:
mongo-data: