mint.yml 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. - name: "local compile"
  2. hosts: building
  3. tasks:
  4. - name: "install dashboard dependencies"
  5. ansible.builtin.shell:
  6. cmd: yarn install
  7. chdir: "{{ playbook_dir }}/../dashboard"
  8. - name: "build dashboard"
  9. ansible.builtin.shell:
  10. cmd: yarn build
  11. chdir: "{{ playbook_dir }}/../dashboard"
  12. environment:
  13. NODE_OPTIONS: "--max_old_space_size=4096"
  14. PUBLIC_URL: "{{ app_dashboard_base_path }}"
  15. REACT_APP_DEFAULT_LOCALE: "zh-Hans"
  16. REACT_APP_LANGUAGES: "en-US,zh-Hans,zh-Hant"
  17. REACT_APP_ENABLE_LOCAL_TOKEN: "true"
  18. REACT_APP_TOKEN_KEY: "token.20230919"
  19. REACT_APP_DOCUMENTS_SERVER: "{{ app_documents_server }}"
  20. REACT_APP_RPC_SERVER: "{{ app_grpc_web_server }}"
  21. REACT_APP_ASSETS_SERVER: "{{ app_assets_server }}"
  22. REACT_APP_API_SERVER: "https://{{ app_domain }}"
  23. REACT_APP_ICP_CODE: "{{ app_icp_code }}"
  24. REACT_APP_QUESTIONNAIRE_LINK: "{{ app_questionnaire_link }}"
  25. - name: deploy php-fpm servers
  26. hosts:
  27. - php_fpm
  28. roles:
  29. - mint-v2
  30. - name: run db migration
  31. hosts:
  32. - dbm
  33. tasks:
  34. - name: run db-migrate
  35. become: true
  36. ansible.builtin.shell:
  37. cmd: su www-data -pc "php artisan migrate"
  38. chdir: "{{ app_deploy_root }}/htdocs"
  39. - name: setup tulip
  40. hosts:
  41. - tulip
  42. tasks:
  43. - name: upload pali.stop
  44. become: true
  45. ansible.builtin.copy:
  46. dest: "/usr/share/postgresql/{{ app_postgresql_version }}/tsearch_data/"
  47. src: "{{ playbook_dir }}/../rpc/tulip/tulip/dictionary/pali.stop"
  48. owner: root
  49. group: root
  50. mode: "0644"
  51. - name: upload pali.syn
  52. become: true
  53. ansible.builtin.copy:
  54. dest: "/usr/share/postgresql/{{ app_postgresql_version }}/tsearch_data/"
  55. src: "{{ playbook_dir }}/../rpc/tulip/tulip/dictionary/pali.syn"
  56. owner: root
  57. group: root
  58. mode: "0644"
  59. - name: restrat postgresql server
  60. become: true
  61. ansible.builtin.systemd:
  62. state: restarted
  63. name: postgresql
  64. - name: run db migrate
  65. ansible.builtin.shell:
  66. cmd: dbmate up
  67. chdir: "{{ app_deploy_root }}/agile/rpc/tulip/tulip/db"