apt install docker docker-compose #if not installed then run this command in local for installing
docker-compose up -d #To start docker services if not run 4-services then use this commands
docker-compose down #To stop docker if requited
docker exec -it php-fpm bash #enter in docker cli
docker exec -it db bash enter database on cli then use it.
sudo a2enmod proxy_http #enable proxy module
===import Db in Docker====
docker exec -i [your Docker db host] mysql -u [userName] -p[pswd] [yourDatabaseName] < [SqlFilePath]; Example.1668176117_db_dbbackup.sql
==== VirtualHost for docker project : ==
create this virtual host using normal process as we create and put this code for docker project.
ServerName [HostName] #xyz.local.com ServerAdmin webmaster@localhost
ProxyPass / http://localhost:81/ ProxyPassReverse / http://localhost:81/
ProxyPreserveHost On ProxyRequests Off ProxyVia On ErrorLog
${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined
Comments
Post a Comment