- playbook.yml (hosts: monoco) + vars/default.yml, requirements.yml - roles: network (shared docker network), greatbear (registry pull, bind mount /var/lib/greatbear/pb_data, .env upload, health wait), caddy (blockinfile snippet into the shared Caddyfile + docker exec reload) - image honors PB_DATA_DIR and runs as root to match the bind-mount pattern - frontend on www.greatbear.in (+apex) with /api/* and /_* proxied to PocketBase; admin.greatbear.in redirects to the admin UI
23 lines
504 B
Caddyfile
23 lines
504 B
Caddyfile
{{ host }}{% if apex_host is defined and apex_host %}, {{ apex_host }}{% endif %} {
|
|
# PocketBase Admin UI and REST API
|
|
redir /_ /_/
|
|
handle /_/* {
|
|
reverse_proxy {{ container_name }}:8090
|
|
}
|
|
handle /api/* {
|
|
reverse_proxy {{ container_name }}:8090
|
|
}
|
|
|
|
# TanStack Start Frontend Application
|
|
handle {
|
|
reverse_proxy {{ container_name }}:3000
|
|
}
|
|
}
|
|
|
|
{% if admin_host is defined and admin_host %}
|
|
{{ admin_host }} {
|
|
redir / /_/
|
|
reverse_proxy {{ container_name }}:8090
|
|
}
|
|
{% endif %}
|