Skip to content

Instantly share code, notes, and snippets.

@ScriptBytes
Last active September 25, 2025 15:35
Show Gist options
  • Save ScriptBytes/2c0b8658fe6e16467f697f76be06f7bd to your computer and use it in GitHub Desktop.
Save ScriptBytes/2c0b8658fe6e16467f697f76be06f7bd to your computer and use it in GitHub Desktop.

Revisions

  1. ScriptBytes renamed this gist Oct 9, 2023. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. ScriptBytes created this gist Oct 9, 2023.
    14 changes: 14 additions & 0 deletions docker-compose.yml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    version: '3.8'
    services:
    mongo:
    image: mongo:7.0
    environment:
    MONGO_INITDB_ROOT_USERNAME: mongadmin
    MONGO_INITDB_ROOT_PASSWORD: LikeAndSubscribe
    ports:
    - 27017:27017
    volumes:
    - mongodata:/data/db
    volumes:
    mongodata:
    driver: local
    7 changes: 7 additions & 0 deletions dockerrun.bash
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    docker run -d \
    --name mongo-demo \
    -e MONGO_INITDB_ROOT_USERNAME=mongoadmin \
    -e MONGO_INITDB_ROOT_PASSWORD=LikeAndSubscribe \
    -p 27017:27017 \
    -v mongodemo:/data/db \
    mongo:7.0