Ver código fonte

:wrench: merge background & frontend

Jeremy Zheng 2 anos atrás
pai
commit
794f9a768f

+ 1 - 24
deploy/mint.yml

@@ -10,29 +10,6 @@
       ansible.builtin.shell:
         cmd: NODE_OPTIONS="--max_old_space_size=4096" PUBLIC_URL=/pcd yarn build
         chdir: "{{ playbook_dir }}/../dashboard"
-
-- hosts:
-    - www
-    - php_fpm
-  tasks:
-    - name: create deployment folder
-      become: true
-      ansible.builtin.file:
-        path: "{{ app_deploy_root }}"
-        state: directory
-        owner: "{{ ansible_user }}"
-    - name: create logs folder
-      become: true
-      ansible.builtin.file:
-        path: "{{ app_deploy_root }}/logs"
-        state: directory
-        owner: "www-data"
-        group: "www-data"
-
-- hosts: php_fpm
-  roles:
-    - laravel
-
 - hosts: www
   roles:
-    - dashboard
+    - mint-v2

+ 0 - 0
deploy/roles/dashboard/tasks/main.yml → deploy/roles/mint-v2/tasks/dashboard.yml


+ 22 - 0
deploy/roles/mint-v2/tasks/init.yml

@@ -0,0 +1,22 @@
+- name: Install node.js packages
+  become: true
+  apt:
+    pkg:
+      - nodejs
+      - npm
+      - yarnpkg
+
+- name: create deployment folder
+  become: true
+  ansible.builtin.file:
+    path: "{{ app_deploy_root }}"
+    state: directory
+    owner: "{{ ansible_user }}"
+
+- name: create logs folder
+  become: true
+  ansible.builtin.file:
+    path: "{{ app_deploy_root }}/logs"
+    state: directory
+    owner: "www-data"
+    group: "www-data"

+ 1 - 8
deploy/roles/laravel/tasks/main.yml → deploy/roles/mint-v2/tasks/laravel.yml

@@ -1,11 +1,3 @@
-- name: Install node.js packages
-  become: true
-  apt:
-    pkg:
-      - nodejs
-      - npm
-      - yarnpkg
-
 # https://laravel.com/docs/10.x/deployment
 
 - name: clone source code
@@ -48,3 +40,4 @@
   ansible.builtin.shell:
     cmd: php artisan view:cache
     chdir: "{{ app_deploy_root }}/htdocs"
+

+ 3 - 0
deploy/roles/mint-v2/tasks/main.yml

@@ -0,0 +1,3 @@
+- import_tasks: init.yml
+- import_tasks: laravel.yml
+- import_tasks: dashboard.yml