docker commands

3) Ddev installation procedure

  1. Required docker version (Docker version 20.10.25)

  2. Required docker-compose version( docker-compose version 1.25.0)

  3. Docker installation must be root less

  4. Install the ddev at our pc using below command

  5. curl -fsSL https://ddev.com/install.sh | bash

  6. In this documentation directory we can see ddev and sql file zip folder , 

  7. download and  extract to endu directory

  8. Checkout to our present branch using below command

  9. git checkout dev-cn-2023

  10. Below command to start the ddev

  11. Ddev start

  12. After successful installation import the sql file

  13. ddev import-db --file=tmp.sql.gz

  14. If u got any errors please check log file using (ddev logs)

  15. Go to ssh (shelll) ddev terminal by below command

  16. ddev ssh

  17. composer install

  18. composer update

  19. composer dump-autoload

  20. php artisan optimize:clear

  21. ddev artisan key:generate

  22. To check node version using (node -v) -> (my version -> v16.20.2)

  23. To check php version using (php -v) -> php 7.4.3

  24. All installation is over you can come back from ssh or shell using (exit ) command

  25. You can our website url to check everything installation over

Some useful commands

  1. ddev ssh ( go to ddev shell)

  2. ddev yarn watch ( continuos compiling for vue version)

  3. ddev status ( to know which ports had been using by ddev)

  4. ddev stop ( to stop ddev docker)

  5. ddev restart ( to restart the ddev docker)

  6. ddev phpmyadmin ( to open the sql database panel)

  7. sudo service apache2 stop ( if u encounter an error regarding localhost:80 port already running , at that you can use this command to stop at thaat port)

  8. ddev stop --unlist endu ( to unlist from all location to start at new)


To make rootless docker

  1. sudo docker info

  2. sudo systemctl status docker

  3.  sudo usermod -aG docker ${USER}

  4. su - ${USER}

  5. sudo service apache2 stop

  6. groups 

 

If you have any apaches servers or xampp servers running on your pc, 

  1. Ist stop that servers

  2. sudo /opt/lampp/lampp stop

  3. sudo service apache2 stop

  4. cd endu

  5. sudo update-alternatives --set php /usr/bin/php7.4


  6. ddev stop

  7. ddev start

ddev yarn watch



linux

To access db from server:

mysql -h sql_url -u admin -p

DB_PASSWORD="password"



mysql -h host -u username -p


use dev_cn;

show tables;

select * from table_name;


https://demos.pixinvent.com/vuexy-html-admin-template/html/vertical-menu-template-dark/

No comments:

Post a Comment

Event listening in react

 How we can listen to som eevents some envents fire like click or automatically user enters into input button , that is event on word type i...