/run (f453bc572c48774df7f148fd4b3e73eb913f9c05) (1841 bytes) (mode 100755) (type blob)

#!/bin/bash

read -p "Do you want to create isolated network y/N? " -n 1 -r
echo    # (optional) move to a new line
if [[ $REPLY =~ ^[Yy]$ ]]; then
    echo    # (optional) move to a new line
    docker network create --driver bridge isolated
    printf "\n\nisolated network created\n\n"
else
    printf "not creating isolated network\n\n"
fi

read -p "Do you want to run mongodb-server y/N? " -n 1 -r
echo    # (optional) move to a new line
if [[ $REPLY =~ ^[Yy]$ ]]; then
    echo    # (optional) move to a new line
    docker run --name mongodb-server -p 27017:27017 --network isolated -d mongo
    printf "\n\nmongodb-server runned\n\n"
else
    printf "not running mongodb\n\n"
fi

read -p "Do you want to run mysql-server y/N? " -n 1 -r
echo    # (optional) move to a new line
if [[ $REPLY =~ ^[Yy]$ ]]; then
    echo    # (optional) move to a new line
    docker run --name mysql-server -p 3306:3306 -e MYSQL_ROOT_PASSWORD=root --network isolated -d mysql
    printf "\n\nmysql-server runned\n\n"
else
    printf "not running mysql\n\n"
fi

if [ -n "$1" ]; then
   VERSION=$1
else
    printf "Version shall be set as a parameter.\nExample:\n\trun YOUR_VERSION\n\n"

    read -p "Do you want to set VERSION to 0.0.1 y/N? " -n 1 -r
    echo    # (optional) move to a new line
    if [[ $REPLY =~ ^[Yy]$ ]]; then
        echo    # (optional) move to a new line
        VERSION=0.0.1
    else
        echo "exiting"
        exit -1
    fi
fi

read -p "Do you want to run image with version $VERSION y/N? " -n 1 -r
echo    # (optional) move to a new line
if [[ $REPLY =~ ^[Yy]$ ]]; then
    echo    # (optional) move to a new line
    docker run --name dev-server -p 8080:80 -v $(pwd)/src:/var/www/html --network isolated -d app/server:$VERSION
    docker exec -it dev-server bash
else
    printf "not running app/server:$VERSION\n\n"
fi


Mode Type Size Ref File
100644 blob 11 b8372e6f3e55d70bea16af8b9b57a1f11cc89b11 .gitignore
100644 blob 1210 cf1ab25da0349f84a3fdd40032f0ce99db813b8b LICENSE
100644 blob 2035 c186961772400b47ceb1ece2b46323687112cb13 README.md
100755 blob 721 df2bdb1e793b6970ed8b7ff3210f1ef3650b1c43 build
040000 tree - 2cc458de5b4f9342021c76c1d6a33af73fdcf2f3 docker
100755 blob 1841 f453bc572c48774df7f148fd4b3e73eb913f9c05 run
040000 tree - f7a6205856a0492ba858dd4a165ce02570bb0a26 src
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/ranapat/nasa

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/ranapat/nasa

Clone this repository using git:
git clone git://git.rocketgit.com/user/ranapat/nasa

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main