Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

how to using mongodb docker

//default username: mongoadmin
//default password: mongoadmin
mongodb:
    restart: always
    container_name: app-mongodb
    build:
      context: ./docker/images/mongodb
      dockerfile: Dockerfile
    ports:
      - "27017:27017"
    volumes:
      - ./docker/images/mongodb/data/db:/data/db
      - ./docker/images/mongodb/data/configdb:/data/configdb
    environment:
      MONGO_INITDB_ROOT_USERNAME: ${MONGO_INITDB_ROOT_USERNAME:-mongoadmin}
      MONGO_INITDB_ROOT_PASSWORD: ${MONGO_INITDB_ROOT_PASSWORD:-mongoadmin}
    networks:
      default:
        ipv4_address: 172.20.0.60

//If you want to use mongo-express
  mongo-express:
    restart: always
    container_name: app-mongo-express
    build:
      context: ./docker/images/mongo-express
      dockerfile: Dockerfile
    ports:
      - "8081:8081"
    environment:
      ME_CONFIG_MONGODB_ADMINUSERNAME: ${MONGO_INITDB_ROOT_USERNAME:-mongoadmin}
      ME_CONFIG_MONGODB_ADMINPASSWORD: ${MONGO_INITDB_ROOT_PASSWORD:-mongoadmin}
      ME_CONFIG_MONGODB_SERVER: mongodb
    networks:
      default:
        ipv4_address: 172.20.0.70
Comment

PREVIOUS NEXT
Code Example
Shell :: wc exclude . and .. directories and empty or commented lines 
Shell :: c myprintf 
Shell :: add user to wheel groub 
Shell :: install calibre on centos terminal 
Shell :: copy too large file commmand linux 
Shell :: linux manjaro tg link 
Shell :: concatenation in shell script 
Shell :: kill process in win by pid 
Shell :: android logs for app on terminal 
Shell :: touch equivalent in windows 
Shell :: dockerfile expose 
Shell :: install dlib on windows 
Shell :: see wifi password 
Shell :: ERROR: Error installing jekyll:ERROR: Failed to build gem native 
Shell :: npx code for src folder in react js 
Shell :: will exe file work on ubantu 
Shell :: gparted 
Shell :: start with in shell script 
Shell :: install postman arch linux 
Shell :: lintcode 
Shell :: swap ctrl and caps lock linux 
Shell :: go mod donwload from github 
Shell :: i wrongly deleted code , can i retrieve through git command 
Shell :: install fzf redhat 8 
Php :: magento2 zend log 
Php :: php pretty print 
Php :: php remove numbers from string 
Php :: read json file data using php 
Php :: php convert string to date 
Php :: (2482:3) autoprefixer: Replace color-adjust to print-color-adjust. The color-adjust shorthand is currently deprecated. 
ADD CONTENT
Topic
Content
Source link
Name
3+6 =