ansible-role-samourai-dojo/tasks/podman.yml

45 lines
1.4 KiB
YAML
Raw Normal View History

---
# https://code.samourai.io/dojo/samourai-dojo/-/blob/develop/docker/my-dojo/docker-compose.yaml
- name: Dojo | Build image
register: podman_image_output
containers.podman.podman_image:
name: samourai-dojo
path: ~/src/samourai-dojo
2023-07-16 20:25:07 +00:00
tag: "v{{ samourai_dojo_version }}"
validate_certs: true
pull: false
state: build
build:
# format: oci
file: ~/src/samourai-dojo/docker/my-dojo/node/Dockerfile
extra_args: "--build-arg TOR_LINUX_GID=1107"
- ansible.builtin.debug:
var: podman_image_output
- name: Dojo | Create volumes
containers.podman.podman_volume:
state: present
name: data-tor
recreate: no
when: not onion_services_path.startswith('/')
- name: Dojo | Create container
register: podman_container_output
containers.podman.podman_container:
debug: no
2023-07-16 20:25:07 +00:00
image: "samourai-dojo:v{{ samourai_dojo_version }}"
image_strict: yes
recreate: yes
state: present
name: dojo
env: "{{ samourai_dojo_config }}"
ports: "{{ samourai_dojo_ports }}"
volume:
- /var/lib/tor/hsv3dojo/hostname:/var/lib/tor/hsv3dojo/hostname
# - "{{ onion_services_path }}:/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"
- ansible.builtin.debug:
var: podman_container_output