Pārlūkot izejas kodu

:wrench: add discussion worker support

Jeremy Zheng 2 gadi atpakaļ
vecāks
revīzija
2ffb883766

+ 9 - 0
deploy/roles/mint-v2/tasks/laravel.yml

@@ -114,6 +114,15 @@
     group: root
     mode: "0644"
 
+- name: upload discussion worker service
+  become: true
+  template:
+    src: v2/discussion-worker.service.j2
+    dest: /usr/lib/systemd/system/mint-{{ app_deploy_env }}-discussion-worker.service
+    owner: root
+    group: root
+    mode: "0644"
+
 # - name: run db:migrate
 #   run_once: true
 #   become: true

+ 15 - 0
deploy/roles/mint-v2/templates/v2/discussion-worker.service.j2

@@ -0,0 +1,15 @@
+[Unit]
+Description=Mint discussion worker for {{ app_deploy_env }}
+After=network.target
+
+[Service]
+Type=simple
+ExecStart=/usr/bin/php artisan mq:discussion
+WorkingDirectory={{ app_deploy_root }}/htdocs
+User=www-data
+Group=www-data
+Restart=always
+RestartSec=30s
+
+[Install]
+WantedBy=multi-user.target

+ 1 - 1
deploy/roles/mint-v2/templates/v2/env.j2

@@ -9,7 +9,7 @@ APP_DEBUG=false
 APP_URL="https://{{ app_domain }}"
 
 LOG_CHANNEL=daily
-LOG_DEPRECATIONS_CHANNEL=daily
+LOG_DEPRECATIONS_CHANNEL=null
 LOG_LEVEL=debug
 
 DB_CONNECTION=pgsql