Includes: API (Express/TypeScript), Astro site, Python workers, document generators, FCC compliance tools, Canada CRTC formation, Ansible infrastructure, and deployment scripts. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
43 lines
1.1 KiB
YAML
43 lines
1.1 KiB
YAML
---
|
|
- name: Create site deployment directory
|
|
ansible.builtin.file:
|
|
path: /opt/performancewest/site
|
|
state: directory
|
|
owner: "{{ deploy_user }}"
|
|
group: "{{ deploy_user }}"
|
|
mode: "0755"
|
|
|
|
- name: Sync site source code
|
|
ansible.posix.synchronize:
|
|
src: "{{ playbook_dir }}/../../site/"
|
|
dest: /opt/performancewest/site/
|
|
delete: true
|
|
rsync_opts:
|
|
- "--exclude=node_modules"
|
|
- "--exclude=dist"
|
|
- "--exclude=.astro"
|
|
register: site_sync
|
|
|
|
- name: Build site container
|
|
ansible.builtin.command:
|
|
cmd: docker compose build site
|
|
chdir: /opt/performancewest
|
|
register: site_build
|
|
changed_when: "'writing image' in site_build.stderr"
|
|
|
|
- name: Start site container
|
|
ansible.builtin.command:
|
|
cmd: docker compose up -d site
|
|
chdir: /opt/performancewest
|
|
register: site_start
|
|
changed_when: "'Started' in site_start.stderr or 'Creating' in site_start.stderr"
|
|
|
|
- name: Wait for site to be reachable
|
|
ansible.builtin.uri:
|
|
url: "http://127.0.0.1:{{ site_port }}/"
|
|
status_code: 200
|
|
timeout: 5
|
|
register: site_health
|
|
retries: 12
|
|
delay: 5
|
|
until: site_health.status == 200
|