https://docs.docker.com/get-docker/
cd ~/.ssh
ssh-keygen -t rsa
(name = id_cwops)
cat id_cwops.pub
(copy the key)- Login to the cPanel https://cwa.cwops.org/cpanel/
- Click on SSH Access
- Click on Import Key
- Give it a name
- Paste in the public key
- Don't enter a password
- Don't enter a private key
- On the main SSH Access page, click the key's "Manage" link
- Click the "Authorize" button
- You should now be able to ssh without a password
ssh cwaHost cwa
HostName cwa.cwops.org
User cwacwops
IdentityFile ~/.ssh/id_cwopsgit clone git@github.com:numinos1/cwa-docker.gitproduction_url=https://cwops.org
prod_admin_url=https://cwa.cwops.org
dev_url=http://localhost:3073
db_table_prefix=wpw1_
wp_plugins_to_disable=
db_host=db:3306
db_user=cwacwops_wp540
db_password=cwacwops
db_name=cwacwops_wp540
db_root_password=cwacwops
wp_debug_mode=falseAdd the following line to both the "wordpress" and "db" sections after the "image"
platform: linux/x86_64- Note: The DB password is in www/wp-config.php
ssh cwa
mysqldump -u cwacwops_wp540 cwacwops_wp540 -p --no-tablespaces | gzip > backup.sql.gz
tar -cvzf wp-content.tar.gz www/wp-content
exit
scp cwa:backup.sql.gz init/backup.sql.gz
scp cwa:wp-content.tar.gz .
tar xvfz wp-content.tar.gz
rm wp-content.tar.gzdocker-compose up -d
docker-compose exec wordpress prep.sh- In the Docker Desktop, click "Stop"
- In the Docker Desktop, click "Trash"
rm -rf mysql
rm -rf www
rm init/backup.sql.gz- Follow steps 7 & 8 In the last section
- Note: Wordpress uses personal login credentials
docker ps
docker exec -it <image-id> bash
mysql -u root -pmysql -h 127.0.0.1 -P 3074 -u cwacwops_wp540 --password="cwacwops" cwacwops_wp540
mysql -h 127.0.0.1 -p 3074 -u root --password=cwacwopscd utils
yarn
node snippets.mjs
node tables.mjs| Directory | Description |
|---|---|
| /mysql | Where Docker will mount the MySQL database files |
| /docs | Markdown documentation files |
| /init | Shell scripts for initialization |
| /utils | Node scripts |
| /www/wp-content | Where Docker will mount the wp-content Wordpress directory |