- Makefile builds from 'git archive HEAD' (stale-remote-HEAD impossible): tags registry.tanshu.com/mozimo:<short-commit> + :main; build-check target verifies both architectures without pushing - deploy.sh: refuses dirty tracked tree / HEAD != origin/main (--force to bypass), ff-only pull, passes the commit as image_tag to ansible, --prune flag for opt-in image cleanup - ansible: docker_image uses image_tag extra-var (falls back to tag), prune task keeps the 3 newest mozimo images, mozimo-repo only
36 lines
1.1 KiB
YAML
36 lines
1.1 KiB
YAML
---
|
|
registry: registry.tanshu.com
|
|
username: ta-registry
|
|
password: ff28a01f00c0f39315d94cd9dcb1e554968dba25676a8ea5f2be34e96a9a099f
|
|
|
|
title: mozimo
|
|
tag: staging
|
|
|
|
host_directory: "/var/lib/{{ title }}-staging"
|
|
|
|
host: "staging.mozimo.in"
|
|
|
|
docker_network: "{{ title }}_net"
|
|
|
|
# image tag: deploy.sh passes -e image_tag=<commit>; "tag" is the fallback
|
|
# when running the playbook by hand — rollback = -e image_tag=<older-commit>
|
|
docker_image: "{{ registry }}/{{ title }}:{{ image_tag | default(tag) }}"
|
|
docker_container: "{{ title }}-staging"
|
|
docker_port: 3000
|
|
|
|
instagram_token: IGQWRQSUY4b3RQWU9ZARHlVVUFDaWxJZAWFOUVllM0NxMk1zSHJ5X2JGc2dpRUxyTjBaeDNhUm0yaFZAQeUotVU9VUmFEQkJxU25CdFp3bURSZAGtnLXhCZAHVId21SWUNiNjVzc0pjZAlhPNDRxTDFzZAEQ0ZAXoyVlpUaHcZD
|
|
|
|
|
|
# hosts Caddy publishes on this box: web (SSR) + pocketbase (cms)
|
|
caddy_hosts:
|
|
- host: "{{ host }}"
|
|
upstream: "{{ docker_container }}:{{ docker_port }}"
|
|
- host: "{{ cms_host }}"
|
|
upstream: "{{ docker_container }}:{{ pb_port }}"
|
|
|
|
cms_host: "cms.mozimo.in"
|
|
pb_port: 8090
|
|
|
|
caddy_container: caddy
|
|
caddyfile_path: /var/lib/caddy/conf/Caddyfile
|