Compare commits

..

No commits in common. "8f0497844b2fc9e3364ad7193ec61a48ccc301a1" and "d29e48a594af2ca0dba2166057df79da9b3894da" have entirely different histories.

4 changed files with 4 additions and 27 deletions

View File

@ -4,9 +4,10 @@ TODO
## TODO
* implement option to not have remote url include hostname (i.e., bare domain)
* convert scripts to use ssh pipes/bash here documents.
see [ssh pipes](https://stackoverflow.com/a/4412324), [Bash Here Document](https://stackoverflow.com/a/4412338)
* Script to export database from production database
* Script to export wordpress directory from production
* Script to set up local container using exported database/wordpress installation
* Refactor duplicated code (e.g., creating containers, exporting data)
* convert all scripts to use ssh pipes/bash here documents.
see [ssh pipes](https://stackoverflow.com/a/4412324), [Bash Here Document](https://stackoverflow.com/a/4412338)

View File

@ -1,11 +0,0 @@
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html/wordpress
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
<Directory /var/www/html/wordpress>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>

View File

@ -5,7 +5,6 @@ set -e
_host="$_local_hostname.$_local_domain"
_user_root='root'
_ssh_cmd_root="ssh $_user_root@$_host"
_scp_to="$_user_root@$_host"
_ssh_cmd_www="sshpass -p$_passwd_www ssh $_user_www@$_host"
_ssh_cmd_www_cd="$_ssh_cmd_www cd /var/www/html/wordpress &&"
@ -16,8 +15,7 @@ printf "\nInstalling requirements ..."
$_ssh_cmd_root 'apt-get update && apt-get -y upgrade && apt-get -y install apache2 mariadb-server php php-common libapache2-mod-php python-mysqldb php-gd php-ssh2 php-mysql php-dom php-simplexml php-xml php-xmlreader php-curl php-ftp php-iconv php-imagick php-mbstring php-posix php-sockets php-tokenizer php-zip'
printf "\nConfiguring Apache ..."
scp ./dev/config/000-default.conf "$_scp_to":/etc/apache2/sites-enabled/000-default.conf
$_ssh_cmd_root 'a2enmod rewrite; systemctl restart apache2'
$_ssh_cmd_root 'sed -i '\''s+DocumentRoot /var/www/html$+DocumentRoot /var/www/html/wordpress+'\'' /etc/apache2/sites-enabled/000-default.conf && systemctl restart apache2'
printf "\nSetting %s permissions ..." "$_user_www"
$_ssh_cmd_root "echo \"$_user_www:$_passwd_www\" | chpasswd"

View File

@ -1,11 +0,0 @@
#!/bin/sh
. ./env.sh
ssh "$remote_username@$remote_url" wget -O testdata.xml 'https://raw.githubusercontent.com/WPTRT/theme-unit-test/master/themeunittestdata.wordpress.xml'
ssh "$remote_username@$remote_url" wp "--path=$remote_path" \
import testdata.xml \
--authors=create
ssh "$remote_username@$remote_url" rm testdata.xml