Skip to content

Commit

Permalink
update docker, docker compose 2 and alias
Browse files Browse the repository at this point in the history
  • Loading branch information
jonatanaxe committed Jul 20, 2023
1 parent 996f30f commit baefda4
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 12 deletions.
18 changes: 16 additions & 2 deletions devenvdevilbox.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,26 @@ clear
installenv(){
echo "Install Docker"

sudo apt update
sudo apt install -y docker{,-compose}
sudo apt update -y

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

sudo apt update -y

sudo apt install docker-ce

echo "Applying user Docker permission"
sudo usermod -aG docker ${USER}

echo "Install Docker Compose v2.20.2"
sudo rm -rf $HOME/.docker/cli-plugins/docker-compose
curl -SL https://github.com/docker/compose/releases/download/v2.20.2/docker-compose-linux-x86_64 -o $HOME/.docker/cli-plugins/docker-compose
sudo chmod +x ~/.docker/cli-plugins/docker-compose

docker compose version

echo "Install Devilbox"
cd ~

Expand Down
17 changes: 10 additions & 7 deletions devilbox/bash/aliases.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,17 @@ alias startproj='n98 db:import mage_${PWD##*/}_$(date +"%d-%m-%Y").sql.gz && n98
alias grun='grunt clean && grunt exec && grunt less && grunt watch'
alias mgcp='php ./vendor/bin/ece-patches apply'
alias mgbm='bin/magento'
alias mgcf='mgbm c:f'
alias mgsu='mgbm setup:upgrade'
alias mgsdi='php bin/magento setup:di:compile'
alias mgir='mgbm indexer:reindex'
alias mgdev='mgbm deploy:mode:set developer'
alias mgcf='bin/magento c:f'
alias mgsu='bin/magento setup:upgrade'
alias mgdi='bin/magento setup:di:compile'
alias mgir='bin/magento indexer:reindex'
alias mgsetdev='bin/magento deploy:mode:set developer && bin/magento c:f'
alias mgsetprod='bin/magento deploy:mode:set production && bin/magento c:f'
alias mgdev='bin/magento setup:upgrade && bin/magento deploy:mode:set developer && bin/magento c:f'
alias mgprod='bin/magento setup:upgrade && bin/magento deploy:mode:set production && bin/magento c:f'
alias mgcr='mgbm cron:run'
alias mgredis='mgbm setup:config:set --cache-backend=redis --cache-backend-redis-server=127.0.0.1 --cache-backend-redis-db=0 -n && mgbm setup:config:set --page-cache=redis --page-cache-redis-server=127.0.0.1 --page-cache-redis-db=1 -n && mgbm setup:config:set --session-save=redis --session-save-redis-host=127.0.0.1 --session-save-redis-db=2 -n'
alias mguserjonatan="mgbm admin:user:create --admin-user='jonatanmachado' --admin-password='jonatan@123' --admin-email='jonatan@jonatan.tk' --admin-firstname='Jonatan' --admin-lastname='Machado'"
alias mguserdiscorgento="mgbm admin:user:create --admin-user='discorgento' --admin-password='discorgento123' --admin-email='eu@discorgento.com' --admin-firstname='Discorgento' --admin-lastname='Admin'"
alias mgms='mgbm module:status'
alias mgme='mgbm module:enable'
alias mgmd='mgbm module:disable'
Expand All @@ -28,7 +31,7 @@ alias n98='n98-magerun2.phar'
alias n98dump='n98 db:dump mage_${PWD##*/}_$(date +"%d-%m-%Y") --compression="gzip"'
alias n98import='n98 db:import'
alias n98urlbase='n98 db:query "select * from core_config_data where path like \"%base%url%\";"'
alias n98urlbaseset='n98 db:query "update core_config_data set value = \"https://${PWD##*/}.local/\" where path = \"web/unsecure/base_url\";update core_config_data set value = \"https://${PWD##*/}.local/\" where path = \"web/secure/base_url\";update core_config_data set value = \"https://${PWD##*/}.local/\" where path = \"web/unsecure/base_link_url\";update core_config_data set value = \"https://${PWD##*/}.local/\" where path = \"web/secure/base_link_url\";" && n98urlbase'
alias n98urlbaseset='n98 db:query "update core_config_data set value = \"https://${PWD##*/}.test/\" where path = \"web/unsecure/base_url\";update core_config_data set value = \"https://${PWD##*/}.test/\" where path = \"web/secure/base_url\";update core_config_data set value = \"https://${PWD##*/}.test/\" where path = \"web/unsecure/base_link_url\";update core_config_data set value = \"https://${PWD##*/}.test/\" where path = \"web/secure/base_link_url\";" && n98urlbase'
alias n98th='n98 dev:template-hints && mgcf'
alias ccw='~/.composer/vendor/bin/cache-clean.js --watch'
alias c1='composer-1'
Expand Down
6 changes: 3 additions & 3 deletions devilbox/cfg/.devilbox/nginx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@ vhost: |
access_log "__ACCESS_LOG__" combined;
error_log "__ERROR_LOG__" warn;
set $MAGE_ROOT "/shared/httpd/project";
set $MAGE_ROOT "/shared/httpd/PROJECT";
set $MAGE_MODE developer;
set $MAGE_DEBUG_SHOW_ARGS 1;
include "/shared/httpd/project/nginx.conf.sample";
include "/shared/httpd/PROJECT/nginx.conf.sample";
__REDIRECT__
__SSL__
Expand Down Expand Up @@ -149,4 +149,4 @@ features:
add_header 'Access-Control-Expose-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range';
add_header 'Access-Control-Max-Age' 0;
return 200;
}
}

0 comments on commit baefda4

Please sign in to comment.