From 7671b51616a25fa6cff9c26fe65d5f703ff94e21 Mon Sep 17 00:00:00 2001 From: Sacha Chua Date: Mon, 17 Oct 2022 17:44:06 -0400 Subject: Get wiki role to push updates to the right place in docker Ikiwiki has this three-repo setup with post-update hooks --- README.org | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'README.org') diff --git a/README.org b/README.org index 66d61ff..76c082f 100644 --- a/README.org +++ b/README.org @@ -13,15 +13,42 @@ Docker: needs docker-vars.yml, see docker-vars.yml.sample When you update htmlscrubber.pm in wiki/templates: ansible-playbook -i inventory.yml prod-playbook.yml --tags wiki-plugins +ansible-playbook -i docker-inventory.yml docker-reuse-playbook.yml --tags wiki-plugins *** Docker +Goal: +- [X] Load the wiki at http://localhost:28080 +- [X] Add SSH key +- [X] Add as remote +- [X] Push to the wiki +- [ ] Have the changes show up automatically +- [X] Have ansible copy the SSH key + +file:/docker:emacsconf-front:/home/ikiwiki/emacsconf.setup + Creating: ansible-playbook -i docker-inventory.yml docker-playbook.yml --tags wiki Reusing: ansible-playbook -i docker-inventory.yml docker-reuse-playbook.yml --tags wiki +Copying your SSH key: +set the docker_ssh_key Ansible variable to the path of your public key +or +docker cp ~/.ssh/id_rsa.pub emacsconf-front:/home/ikiwiki/.ssh/authorized_keys2 +docker exec emacsconf-front chown ikiwiki:ikiwiki /home/ikiwiki/.ssh/authorized_keys2 +docker exec emacsconf-front chmod 600 /home/ikiwiki/.ssh/authorized_keys2 + http://localhost:28080/ +ssh localhost -p 2022 + +docker exec -it emacsconf-front /bin/bash + +git remote add docker ssh://ikiwiki@127.0.0.1:2222/var/www/wiki.git + +Debugging +ssh wiki 'cd /var/www/wiki.git; git update-ref refs/heads/master HEAD^' && git push docker 2022-pages + ** Publishing *** Prod To run the playbook and publish the main schedule: -- cgit v1.2.3