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
9 changes: 0 additions & 9 deletions api-gateway/default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,6 @@ server {
}
}

# MongoDB Express Admin Interface (if localdb profile is used)
# location /admin/ {
# proxy_pass http://mongo-express:8081/;
# proxy_set_header Host $host;
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# proxy_set_header X-Forwarded-Proto $scheme;
# }

# Health check endpoint
location /health {
access_log off;
Expand Down
7 changes: 5 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,16 @@ services:
- ./user-service/.env # Environment variables for user-service
environment:
- NODE_ENV=production # Set Node.js to production mode
- DB_LOCAL_URI=mongodb://root:example@mongodb-user-services:27017 # Override for container

### NOTE: LOCAL DATABASE SERVICES YET TO BE TESTED BY ME DO NOT USE YET ###

# MongoDB Database for User Services
mongodb-user-services:
image: mongo:7.0.12
container_name: peerprep-mongodb-user-services
ports:
- "27017:27017" # Expose MongoDB port to host
volumes:
- mongodb-data-user-services:/data/db # Persistent data storage
env_file:
Expand All @@ -68,8 +71,8 @@ services:
mongo-express:
image: mongo-express:1.0.2
container_name: peerprep-mongo-express
expose:
- "8081" # Internal port only - accessed via API Gateway at /admin/
ports:
- "8081:8081" # Expose admin interface on host port 8081
env_file:
- ./mongo-express/.env # Connection settings
depends_on:
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"build:frontend": "cd frontend && npm run build",
"build:user-service": "echo 'No build step for user-service'",
"install:all": "npm install && cd frontend && npm install && cd ../user-service && npm install",
"clean": "cd frontend && rm -rf node_modules && cd ../user-service && rm -rf node_modules && rm -rf node_modules"
"clean": "cd frontend && rm -rf node_modules && cd ../user-service && rm -rf node_modules && rm -rf node_modules",
"localdb": "docker-compose up mongodb-user-services mongo-express -d"
},
"devDependencies": {
"concurrently": "^8.2.2"
Expand Down