Files
hops/ansible/roles/hops/templates/hops.container.j2
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

41 lines
1.1 KiB
Django/Jinja

# Hops n Grains rootless Quadlet unit. Managed by Ansible.
# Joins {{ network_name }}.network so Caddy resolves {{ container_name }}.
[Unit]
Description=Hops n Grains microbrewery (PocketBase + TanStack Start)
After=network-online.target
Wants=network-online.target
[Container]
ContainerName={{ container_name }}
Image={{ image }}
# The image runs as root. keep-id maps that onto {{ podman_user }}, so
# {{ host_directory }} stays owned by the host user.
UserNS=keep-id:uid=0,gid=0
# systemd reads the env file. It must exist before the unit starts.
EnvironmentFile={{ host_directory }}/.env
Network={{ network_name }}.network
Volume={{ host_directory }}/pb_data:/app/pb_data
# No PublishPort. Caddy reaches both ports over {{ network_name }}_net.
# podman builds OCI images by default and drops the Dockerfile HEALTHCHECK,
# so declare the check here.
HealthCmd={{ health_cmd }}
HealthInterval=15s
HealthTimeout=3s
HealthRetries=3
HealthStartPeriod=5s
[Service]
Restart=always
# The entrypoint waits for PocketBase and the superuser before the site answers.
TimeoutStartSec=300
[Install]
WantedBy=default.target