Skip to content

Commit

Permalink
Some fixes + New Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
JoelGMSec committed Aug 22, 2024
1 parent 33c0f40 commit b620936
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions Cloudtopolis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,23 +80,23 @@ sudo mkdir Cloudtopolis > /dev/null 2>&1 ; sudo mkdir Cloudtopolis/mysql > /dev/
if sudo test -f "$(pwd)/Cloudtopolis/.creds" ; then
RAND=$(cat Cloudtopolis/.creds)
else
RAND=$(< /dev/urandom tr -dc 'A-Za-z0-9!@$' | fold -w 16 | head -n 1)
RAND=$(< /dev/urandom tr -dc 'A-Za-z0-9' | fold -w 16 | head -n 1)
sudo sh -c "echo -n $RAND > $(pwd)/Cloudtopolis/.creds"
fi

echo -e "\e[0m"
echo -e "\e[32;1m[+] Installing MySQL Database..\e[37;1m"
sudo docker run --rm --name mysql -v $(pwd)/Cloudtopolis/mysql:/var/lib/mysql -e MYSQL_ROOT_PASSWORD="$RAND" -d mysql:5.7 > /dev/null 2>&1
echo -e "\e[32;1m[+] Installing MariaDB Database..\e[37;1m"
sudo docker run --rm --name mysql -v $(pwd)/Cloudtopolis/mysql:/var/lib/mysql -e MARIADB_ROOT_PASSWORD="$RAND" -d mariadb:10.11 > /dev/null 2>&1
echo -e "\e[37;1mDone!"

docker tag mysql:5.7 cloudtopolis/database > /dev/null 2>&1
docker rmi mysql:5.7 > /dev/null 2>&1
CloudtopolisDB="$(pwd)/Cloudtopolis/mysql/sys"
docker tag mariadb:10.11 cloudtopolis/database > /dev/null 2>&1
docker rmi mariadb:10.11 > /dev/null 2>&1
CloudtopolisDB="$(pwd)/Cloudtopolis/mysql/hashtopolis"

echo -e "\e[0m"
echo -e "\e[32;1m[+] Installing Hashtopolis..\e[37;1m"
sudo docker build -t joelgmsec/cloudtopolis . > /dev/null 2>&1
sudo docker run --rm --name cloudtopolis --link mysql:mysql -v $(pwd)/Cloudtopolis/inc:/var/www/html/inc -v $(pwd)/Cloudtopolis/import:/var/www/html/import -v $(pwd)/Cloudtopolis/files:/var/www/html/files -e H8_USER="admin" -e H8_PASS="$RAND" -d -p 8000:80 joelgmsec/cloudtopolis > /dev/null 2>&1
sudo docker run --rm --name cloudtopolis --link mysql:mysql -v $(pwd)/Cloudtopolis/inc:/var/www/html/inc -v $(pwd)/Cloudtopolis/import:/var/www/html/import -v $(pwd)/Cloudtopolis/files:/var/www/html/files -e H8_USER="admin" -e H8_PASS="$RAND" -e MYSQL_USER="root" -e MYSQL_PASSWORD="$RAND" -d -p 8000:80 joelgmsec/cloudtopolis > /dev/null 2>&1
echo -e "\e[37;1mDone!"

if [ ! -d $CloudtopolisDB ] ; then
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
echo "ServerName Hashtopolis" > /etc/apache2/conf-enabled/serverName.conf && \
rm -rf /var/lib/apt /var/lib/dpkg /var/cache/apt /usr/share/doc /usr/share/man /usr/share/info

COPY entrypoint.sh /
COPY entrypoint.sh /
COPY conf.php /var/www/
COPY adduser.php /var/www/html/install/

Expand Down

0 comments on commit b620936

Please sign in to comment.