Updated the backend docker compose file and also added dockercompose for mongo and mongo express

This commit is contained in:
Md. Mosiur Rahman
2025-08-18 16:06:38 +06:00
parent 6110ab206f
commit 893a35972e
4 changed files with 74 additions and 1 deletions

View File

@@ -14,6 +14,12 @@ RUN npm install --save-dev @types/cors
COPY . .
USER root
RUN chown -R node:node /app
USER node
EXPOSE 3000
CMD ["npm","start"]

View File

@@ -1,2 +1,2 @@
MONGO_URI=mongodb://jutsujen:f%40!ry-T%40!l@118.67.213.117:27017/navigatorDB?authSource=admin
MONGO_URI=mongodb://jutsujen:fa!ry-Ta!l@103.209.42.141:27017/navigatorDB?authSource=admin
PASS_PHASE=18b1e091097da0eac9764f65dea470bf6a46b3f3fb693627a11cff8353efb007

35
db/docker-compose.yml Normal file
View File

@@ -0,0 +1,35 @@
services:
mongo:
image: mongo
restart: always
ports:
- 27017:27017
environment:
MONGO_INITDB_ROOT_USERNAME: "jutsujen"
MONGO_INITDB_ROOT_PASSWORD: "fa!ry-Ta!l"
networks:
- backend_network
mongo-express:
image: mongo-express
restart: always
ports:
- 8081:8081
environment:
ME_CONFIG_MONGODB_ENABLE_ADMIN: "true"
ME_CONFIG_MONGODB_SERVER: "mongo"
ME_CONFIG_MONGODB_PORT: "27017"
ME_CONFIG_MONGODB_AUTH_USERNAME: "jutsujen"
ME_CONFIG_MONGODB_AUTH_PASSWORD: "fa!ry-Ta!l"
ME_CONFIG_MONGODB_AUTH_SOURCE: admin
ME_CONFIG_BASICAUTH: false
networks:
- backend_network
networks:
backend_network:
name: backend-network
driver: bridge

32
db/docker-compose.yml.bkp Normal file
View File

@@ -0,0 +1,32 @@
services:
mongo:
image: mongo
restart: always
ports:
- 27017:27017
environment:
MONGO_INITDB_ROOT_USERNAME: jutsujen
MONGO_INITDB_ROOT_PASSWORD: f@!ry-Ta!l
networks:
- backend_network
mongo-express:
image: mongo-express
restart: always
ports:
- 8081:8081
environment:
ME_CONFIG_MONGODB_ADMINUSERNAME: jutsujen
ME_CONFIG_MONGODB_ADMINPASSWORD: f@!ry-Ta!l
ME_CONFIG_MONGODB_URL: mongodb://jutsujen:f@!ry-Ta!l@db-mongo-1:27017/
ME_CONFIG_BASICAUTH: false
networks:
- backend_network
networks:
backend_network:
name: backend-network
driver: bridge