diff options
| author | 2025-08-03 19:07:13 +0700 | |
|---|---|---|
| committer | 2025-08-03 19:07:13 +0700 | |
| commit | 7503d0f2fb605f014ba9f86dbae448a5e046b109 (patch) | |
| tree | 87e29f4ca2f36aacdddaeb0af743e0516d4308e0 /deploy | |
| parent | cf7199ef78a132e2661df417174c2ced0411a828 (diff) | |
| download | web-7503d0f2fb605f014ba9f86dbae448a5e046b109.tar.gz web-7503d0f2fb605f014ba9f86dbae448a5e046b109.zip | |
feat: add ci/cd for build, push & deploy
Diffstat (limited to 'deploy')
| -rw-r--r-- | deploy/inventory.yml | 15 | ||||
| -rw-r--r-- | deploy/playbook.yml | 20 |
2 files changed, 35 insertions, 0 deletions
diff --git a/deploy/inventory.yml b/deploy/inventory.yml new file mode 100644 index 0000000..d3c325f --- /dev/null +++ b/deploy/inventory.yml @@ -0,0 +1,15 @@ +prod: + hosts: + pl.saya.today: + saya_today_web: + name: sayana-web + hostname: sayana-web + ipv4_address: 172.16.0.18 + +stage: + hosts: + pl.saya.today: + saya_today_web: + name: sayana-demo + hostname: sayana-demo + ipv4_address: 172.16.0.17 diff --git a/deploy/playbook.yml b/deploy/playbook.yml new file mode 100644 index 0000000..84432d8 --- /dev/null +++ b/deploy/playbook.yml @@ -0,0 +1,20 @@ +--- +- name: Deploy saya-today-web Docker Container + remote_user: svc_github + + tasks: + - name: Deploy saya-today-web Docker Container + community.docker.docker_container: + name: "{{ saya_today_web.name }}" + hostname: "{{ saya_today_web.hostname }}" + image: "ghcr.io/SayaAndy/saya-today-web:{{ saya_today_web.tag }}" + env: + B2_KEY_ID: "{{ saya_today_web.b2.key_id }}" + B2_APPLICATION_KEY: "{{ saya_today_web.b2.application_key }}" + network_mode: caddy + networks: + - name: caddy + ipv4_address: "{{ saya_today_web.ipv4_address }}" + restart_policy: unless-stopped + no_log: true +... |