|
|
@@ -1,5 +1,5 @@
|
|
|
- name: Upload launch.sh
|
|
|
- ansible.builtin.template:
|
|
|
+ ansible.builtin.copy:
|
|
|
src: launch.sh
|
|
|
dest: "{{ app_deploy_target }}/scripts/"
|
|
|
mode: "0555"
|
|
|
@@ -12,135 +12,53 @@
|
|
|
- setup
|
|
|
chdir: "{{ app_deploy_target }}/"
|
|
|
creates: "{{ app_deploy_target }}/api-v8/public/node_modules"
|
|
|
-# - name: Setup nodejs packages for v2
|
|
|
-# ansible.builtin.command:
|
|
|
-# argv:
|
|
|
-# - "{{ app_deploy_target }}/docker/mint/run.sh"
|
|
|
-# - "{{ app_mint_image_name }}"
|
|
|
-# - npm
|
|
|
-# - install
|
|
|
-# chdir: "{{ app_deploy_target }}/api-v8"
|
|
|
-# creates: "{{ app_deploy_target }}/api-v8/node_modules"
|
|
|
-# - name: Upload .env(v2)
|
|
|
-# become: true
|
|
|
-# ansible.builtin.template:
|
|
|
-# src: v2/env.j2
|
|
|
-# dest: "{{ app_deploy_target }}/mint/api-v8/.env"
|
|
|
-# owner: www-data
|
|
|
-# group: www-data
|
|
|
-# mode: "0444"
|
|
|
-
|
|
|
-# - name: Upload config.php(v1)
|
|
|
-# ansible.builtin.become: true
|
|
|
-# ansible.builtin.template:
|
|
|
-# src: v1/config.php.j2
|
|
|
-# dest: "{{ app_deploy_target }}/mint/api-v8/public/app/config.php"
|
|
|
-# owner: www-data
|
|
|
-# group: www-data
|
|
|
-# mode: "0444"
|
|
|
-
|
|
|
-# - name: Upload config.js(v1)
|
|
|
-# become: true
|
|
|
-# ansible.builtin.template:
|
|
|
-# src: v1/config.js.j2
|
|
|
-# dest: "{{ app_deploy_target }}/mint/api-v8/public/app/config.js"
|
|
|
-# owner: www-data
|
|
|
-# group: www-data
|
|
|
-# mode: "0444"
|
|
|
-
|
|
|
-# - name: Setup bootstrap folder for {{ ansible_user }}
|
|
|
-# become: true
|
|
|
-# ansible.builtin.file:
|
|
|
-# path: "{{ app_deploy_target }}/mint/api-v8/bootstrap/cache"
|
|
|
-# state: directory
|
|
|
-# owner: "{{ ansible_user }}"
|
|
|
-# group: "{{ ansible_user }}"
|
|
|
-# recurse: true
|
|
|
-
|
|
|
-# - name: Auto-loader optimization for v2
|
|
|
-# ansible.builtin.command:
|
|
|
-# argv:
|
|
|
-# - /usr/bin/composer
|
|
|
-# - update
|
|
|
-# - --optimize-autoloader
|
|
|
-# - --no-dev
|
|
|
-# chdir: "{{ app_deploy_target }}/api-v8"
|
|
|
-
|
|
|
-# - name: Auto-loader optimization for v1
|
|
|
-# ansible.builtin.command:
|
|
|
-# argv:
|
|
|
-
|
|
|
-# chdir: "{{ app_deploy_target }}/mint/api-v8/public"
|
|
|
-
|
|
|
-# - name: Setup storage folder for v2 for php-fpm
|
|
|
-# become: true
|
|
|
-# ansible.builtin.file:
|
|
|
-# path: "{{ app_deploy_target }}/mint/api-v8/storage"
|
|
|
-# state: directory
|
|
|
-# owner: www-data
|
|
|
-# group: www-data
|
|
|
-# recurse: true
|
|
|
-
|
|
|
-# - name: Caching configuration
|
|
|
-# become: true
|
|
|
-# become_user: www-data
|
|
|
-# ansible.builtin.command:
|
|
|
-# argv:
|
|
|
-# - /usr/bin/php
|
|
|
-# - artisan
|
|
|
-# - config:cache
|
|
|
-# chdir: "{{ app_deploy_target}}/api-v8"
|
|
|
|
|
|
-# - name: Caching events
|
|
|
-# become: true
|
|
|
-# become_user: www-data
|
|
|
-# ansible.builtin.command:
|
|
|
-# argv:
|
|
|
-# - /usr/bin/php
|
|
|
-# - artisan
|
|
|
-# - event:cache
|
|
|
-# chdir: "{{ app_deploy_target }}/api-v8"
|
|
|
-
|
|
|
-# - name: Caching routes
|
|
|
-# become: true
|
|
|
-# become_user: www-data
|
|
|
-# ansible.builtin.command:
|
|
|
-# argv:
|
|
|
-# - /usr/bin/php
|
|
|
-# - artisan
|
|
|
-# - route:cache
|
|
|
-# chdir: "{{ app_deploy_target }}/api-v8"
|
|
|
-
|
|
|
-# - name: Caching views
|
|
|
-# become: true
|
|
|
-# become_user: www-data
|
|
|
-# ansible.builtin.shell:
|
|
|
-# argv:
|
|
|
-# - /usr/bin/php
|
|
|
-# - artisan
|
|
|
-# - view:cache
|
|
|
-# chdir: "{{ app_deploy_target }}/api-v8"
|
|
|
-
|
|
|
-# - name: Setup sqlite3 db for v1
|
|
|
-# become: true
|
|
|
-# ansible.builtin.file:
|
|
|
-# src: /var/www/shared/appdata
|
|
|
-# dest: "{{ app_deploy_target }}/mint/api-v8/storage/app/data"
|
|
|
-# state: link
|
|
|
-
|
|
|
-# # https://laravel.com/docs/10.x/scheduling#running-the-scheduler
|
|
|
-# - name: Upload scheduler service
|
|
|
-# become: true
|
|
|
-# ansible.builtin.template:
|
|
|
-# src: v2/scheduler.service.j2
|
|
|
-# dest: /usr/lib/systemd/system/{{ inventory_hostname }}-scheduler.service
|
|
|
-# owner: root
|
|
|
-# group: root
|
|
|
-# mode: "0644"
|
|
|
+- name: Upload .env(v2)
|
|
|
+ ansible.builtin.template:
|
|
|
+ src: v2/env.j2
|
|
|
+ dest: "{{ app_deploy_target }}/api-v8/.env"
|
|
|
+ mode: "0444"
|
|
|
|
|
|
-# - name: Setup laravel queue workers
|
|
|
-# ansible.builtin.import_tasks: queue-workers.yml
|
|
|
+- name: Upload config.php(v1)
|
|
|
+ ansible.builtin.template:
|
|
|
+ src: v1/config.php.j2
|
|
|
+ dest: "{{ app_deploy_target }}/api-v8/public/app/config.php"
|
|
|
+ mode: "0444"
|
|
|
|
|
|
+- name: Upload config.js(v1)
|
|
|
+ ansible.builtin.template:
|
|
|
+ src: v1/config.js.j2
|
|
|
+ dest: "{{ app_deploy_target }}/api-v8/public/app/config.js"
|
|
|
+ mode: "0444"
|
|
|
+
|
|
|
+- name: Setup sqlite3 db for v1
|
|
|
+ ansible.builtin.file:
|
|
|
+ src: /mnt/{{ app_domain }}/shared/appdata
|
|
|
+ dest: "{{ app_deploy_target }}/api-v8/storage/app/data"
|
|
|
+ state: link
|
|
|
+
|
|
|
+# https://laravel.com/docs/10.x/scheduling#running-the-scheduler
|
|
|
+- name: Upload scheduler service
|
|
|
+ become: true
|
|
|
+ ansible.builtin.template:
|
|
|
+ src: v2/scheduler.service.j2
|
|
|
+ dest: /usr/lib/systemd/system/scheduler.{{ app_domain }}.service
|
|
|
+ owner: root
|
|
|
+ group: root
|
|
|
+ mode: "0644"
|
|
|
+
|
|
|
+# https://wiki.archlinux.org/title/Systemd/Timers
|
|
|
+- name: Upload scheduler timer
|
|
|
+ become: true
|
|
|
+ ansible.builtin.template:
|
|
|
+ src: v2/scheduler.timer.j2
|
|
|
+ dest: /usr/lib/systemd/system/scheduler.{{ app_domain }}.timer
|
|
|
+ owner: root
|
|
|
+ group: root
|
|
|
+ mode: "0644"
|
|
|
+
|
|
|
+- name: Setup laravel queue workers
|
|
|
+ ansible.builtin.import_tasks: queue-workers.yml
|
|
|
# - name: Setup morus service
|
|
|
# ansible.builtin.import_tasks: morus.yml
|
|
|
|