Files
hops/ansible/vars/default.yml
T
tanshu a7c9324170 Model the build on mozimo and target emily
- Makefile: PLATFORMS, tags :<commit> and :main, build-check with --pull.
- deploy.sh: push, guards, git pull --ff-only, optional --prune, image_tag.
- Replace .containerignore with .dockerignore.
- Add the opt-in image prune to the hops role.
- Tag the Caddyfile task so --skip-tags caddy works before DNS cutover.
- Trim comments and rewrite build and deploy text in plain prose.
2026-10-20 17:47:49 +05:30

68 lines
2.1 KiB
YAML

---
# Rootless Podman and Quadlet on emily. The play runs as the connecting user,
# so these paths follow that user's home.
podman_user: "{{ ansible_facts['user_id'] }}"
podman_data_dir: "{{ ansible_facts['user_dir'] }}/podman-data"
quadlet_dir: "{{ ansible_facts['user_dir'] }}/.config/containers/systemd"
registry: registry.tanshu.com
registry_username: ta-registry
registry_password: ff28a01f00c0f39315d94cd9dcb1e554968dba25676a8ea5f2be34e96a9a099f
image_name: "{{ registry }}/hops"
# deploy.sh passes image_tag=<commit>. Rollback uses an older commit.
tag: main
image: "{{ image_name }}:{{ image_tag | default(tag) }}"
app_name: hops
container_name: "{{ app_name }}"
unit_name: "{{ container_name }}.service"
# The register role pins NetworkName to hops_net.
network_name: "{{ app_name }}"
host_directory: "{{ podman_data_dir }}/{{ container_name }}"
# Caddy reaches both ports over hops_net. Nothing is published on the host.
site_port: 3000
pb_port: 8090
# podman builds OCI images by default and drops the Dockerfile HEALTHCHECK,
# so the unit declares the check and the play gates on it.
health_cmd: "curl -fsS http://127.0.0.1:{{ pb_port }}/api/health > /dev/null && curl -fsS http://127.0.0.1:{{ site_port }} > /dev/null"
host: www.hopsngrains.com
apex_host: hopsngrains.com
admin_host: admin.hopsngrains.com
caddy_name: caddy
caddyfile_path: "{{ podman_data_dir }}/{{ caddy_name }}/conf/Caddyfile"
# Appended to the shared Caddyfile by roles/caddy.
snippet_block: |
{{ host }}{% if apex_host is defined and apex_host %}, {{ apex_host }}{% endif %} {
# PocketBase admin UI and REST API
redir /_ /_/
handle /_/* {
reverse_proxy {{ container_name }}:{{ pb_port }}
}
handle /api/* {
reverse_proxy {{ container_name }}:{{ pb_port }}
}
# TanStack Start frontend
handle {
reverse_proxy {{ container_name }}:{{ site_port }}
}
}
{% if admin_host is defined and admin_host %}
{{ admin_host }} {
redir / /_/
reverse_proxy {{ container_name }}:{{ pb_port }}
}
{% endif %}
# Bootstrapped on first start.
pb_admin_email: admin@hopsngrains.com
pb_admin_password: HopsPassword1234!