From 296a5f9234ca20f3092ef957cb05c0de9caa102b Mon Sep 17 00:00:00 2001 From: Brian Lee Date: Sun, 16 Jul 2023 12:47:11 -0700 Subject: [PATCH] Missed an install script step. Added a required volume for hsv3 hostname file. --- README.md | 4 ++-- tasks/podman.yml | 8 ++++++++ tasks/setup.yml | 9 ++++++++- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 754eb5f..c032541 100644 --- a/README.md +++ b/README.md @@ -76,7 +76,7 @@ Configure `samourai_dojo_version` and rerun the playbook. ansible-playbook playbooks/samourai.yml --tags dojo ``` -Merge any [meaningful updates](https://code.samourai.io/dojo/samourai-dojo/-/tree/master/docker/my-dojo/node) to relevant Node.js environment variables. +Mind any changes specifically to Node.js [environment variables](https://code.samourai.io/dojo/samourai-dojo/-/tree/master/docker/my-dojo/node), and the Dojo [install scripts](https://code.samourai.io/dojo/samourai-dojo/-/tree/master/docker/my-dojo/install) (or wait for this role to document any extra upgrade steps). ## Monitoring @@ -84,7 +84,7 @@ See [dojo-exporter](https://github.com/bleetube/dojo_exporter) ## Troubleshooting -``` +```bash podman logs --follow dojo podman inspect dojo | jq .[].Config.Env ``` diff --git a/tasks/podman.yml b/tasks/podman.yml index 90910db..76481e4 100644 --- a/tasks/podman.yml +++ b/tasks/podman.yml @@ -17,6 +17,12 @@ - ansible.builtin.debug: var: podman_image_output +- name: Dojo | Create volumes + containers.podman.podman_volume: + state: present + name: data-tor + recreate: no + - name: Dojo | Create container register: podman_container_output containers.podman.podman_container: @@ -28,6 +34,8 @@ name: dojo env: "{{ samourai_dojo_config }}" ports: "{{ samourai_dojo_ports }}" + volume: + - data-tor:/var/lib/tor command: /home/node/app/restart.sh # command: "/home/node/app/wait-for-it.sh host.containers.internal:3306 --timeout=720 --strict -- /home/node/app/restart.sh" diff --git a/tasks/setup.yml b/tasks/setup.yml index 9ec03cb..05f10ef 100644 --- a/tasks/setup.yml +++ b/tasks/setup.yml @@ -7,6 +7,7 @@ register: git_repository tags: upgrade +# install/install-scripts.sh - name: Dojo | Check whether the database has been initialized community.mysql.mysql_info: filter: @@ -23,4 +24,10 @@ target: ~/src/samourai-dojo/db-scripts/1_db.sql.tpl login_user: "{{ samourai_dojo_config.MYSQL_USER }}" login_password: "{{ samourai_dojo_config.MYSQL_PASSWORD }}" - when: databases.databases.samourai.size == 0 \ No newline at end of file + when: databases.databases.samourai.size == 0 + +- name: Dojo | Initialize the maintenace tool + ansible.builtin.copy: + remote_src: yes + src: "~/src/samourai-dojo/static/admin/conf/index-{{ samourai_dojo_config.COMMON_BTC_NETWORK }}.js" + dest: ~/src/samourai-dojo/static/admin/conf/index.js