![]() Post update hooks are scripts that are executed after the bare repository receives an update. db.sql.gz - will be the file that will contain the database These files have purposes in a specific install. There are certain files in which any site should have. The naming convention for the database is to use the repo-name but replace any special characters with the underscore character _. Push local commits to remote bare git repoĪfter creating the bare git repo a virtual host should be created, also along with it the root directory of the Also creating the database where the application will be storing it's content is necessary.Create site directory mkdir -p /var/www/. ![]() Soft link the virtual host file by ln -s /etc/httpd/sites-available/.conf /etc/httpd/sites-enabled/.Create virtual host file in the server in /etc/httdp/sites-available.gitignore and package.json (NPM build scripts are here) Initiate Create the local site repo, add.Here are the rough steps you need to follow in order to deploy a site through : 'Ĭat $WP_CONFIG_TMPL | sed "s/site-db/ $DB_NAME/g " > $GIT_TMPLS_DIR/ $SITE_NAME/wp-config.phpĬhown -R git:git $GIT_TMPLS_DIR/ $SITE_NAME echo ' ' echo 'Site creation finished ' Steps ' echo "CREATE DATABASE $DB_NAME " | mysqlĬat $POST_HOOK_TMPL | sed "s/site-db/ $DB_NAME/g " | sed "s/site/ $SITE_NAME/g " > $SITE_GIT_DIR/hooks/post-updateĬhomod +x $SITE_GIT_DIR/hooks/post-updateĬhown -R git:git $SITE_GIT_DIR echo 'Creating wp-config template. ' $SITE_DIRĬhown -R git:apache $SITE_DIR echo 'Creating database. ![]() ![]() WP_CONFIG_TMPL=/root/templates/wp-config.phpĮcho 'Creating files for site: ' $SITE_NAME echo 'Creating ' $SITE_CONFĬat $SITE_TMPL | sed "s/site/ $SITE_NAME/g " > $SITE_CONF echo 'Enabling site configuration. POST_HOOK_TMPL=/root/templates/post-update SITES_ENABLED_DIR=/etc/httpd/sites-enabled ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |