All checks were successful
CI / skip-ci-check (pull_request) Successful in 1m22s
CI / lint-and-test (pull_request) Successful in 1m27s
CI / ansible-validation (pull_request) Successful in 2m53s
CI / secret-scanning (pull_request) Successful in 1m24s
CI / dependency-scan (pull_request) Successful in 1m28s
CI / sast-scan (pull_request) Successful in 2m32s
CI / license-check (pull_request) Successful in 1m28s
CI / vault-check (pull_request) Successful in 2m30s
CI / playbook-test (pull_request) Successful in 2m32s
CI / container-scan (pull_request) Successful in 1m53s
CI / sonar-analysis (pull_request) Successful in 2m40s
CI / workflow-summary (pull_request) Successful in 1m22s
- Fix deploy script to handle non-git directories by cloning to temp location and moving contents, preserving .env files during clone - Remove comment lines from env.j2 template to prevent xargs errors - Add initial deploy task to app_setup role to ensure app is deployed before service starts - Fix migrate command precedence to check env-specific overrides first - Add sudo to systemctl restart commands in deploy script - Update documentation with project-specific configuration notes These changes improve deployment reliability for all app projects while adding support for mirrormatch-specific requirements (db:push, seeding). All changes are backward-compatible with existing projects (pote, punimTag).
app_setup
Creates the standard app filesystem layout and runtime services:
/srv/app/backendand/srv/app/frontend/srv/app/.env.<dev|qa|prod>/usr/local/bin/deploy_app.sh(git pull, install deps, build, migrate, restart services)- systemd units:
app-backend.serviceapp-frontend.service
All behavior is driven by variables so you can reuse this role for multiple projects.
Variables
See defaults/main.yml. Common inputs in the app stack:
app_project,app_env(used for naming and.env.<env>selection)app_repo_url,app_repo_dest,app_repo_branchapp_env_vars(map written into/srv/app/.env.<env>)components.backend,components.frontend(enable/disable backend/frontend setup)app_backend_dir,app_frontend_dir, ports and Node.js commands