Преглед изворни кода

:construction: add email & https force forward

Jeremy Zheng пре 4 година
родитељ
комит
1dfafea8e3

+ 1 - 1
deploy/roles/certbot-nginx/tasks/main.yml

@@ -7,7 +7,7 @@
 - name: add Let's Encrypt support
   become: true
   ansible.builtin.shell:
-    cmd: certbot --nginx --non-interactive --agree-tos -m {{ app_master_email }} --domains {{ inventory_hostname }}
+    cmd: certbot --nginx --non-interactive --agree-tos -m {{ app_master_email }} --domains {{ inventory_hostname }} --redirect
 
 - name: restart nginx
   become: true

+ 14 - 16
deploy/roles/mint-clone/tasks/main.yml

@@ -26,15 +26,14 @@
   args:
     chdir: "{{ app_deploy_target }}"
 
-# - name: Install v2 nodejs dependencies
-#   ansible.builtin.shell: npm install
-#   args:
-#     chdir: "{{ app_deploy_target }}"
 - name: Install v2 nodejs dependencies
-  ansible.builtin.file:
-    src: "/var/www/{{ inventory_hostname }}/node_modules/v2"
-    dest: "{{ app_deploy_target }}/node_modules"
-    state: link
+  # ansible.builtin.file:
+  #   src: "/var/www/{{ inventory_hostname }}/node_modules/v2"
+  #   dest: "{{ app_deploy_target }}/node_modules"
+  #   state: link
+  ansible.builtin.shell: npm install
+  args:
+    chdir: "{{ app_deploy_target }}"
 
 # TODO will remove in future
 - name: Install v1 php dependencies
@@ -43,15 +42,14 @@
     chdir: "{{ app_deploy_target }}/public"
 
 # TODO will remove in future
-# - name: Install v1 nodejs dependencies
-#   ansible.builtin.shell: npm install
-#   args:
-#     chdir: "{{ app_deploy_target }}/public"
 - name: Install v1 nodejs dependencies
-  ansible.builtin.file:
-    src: "/var/www/{{ inventory_hostname }}/node_modules/v1"
-    dest: "{{ app_deploy_target }}/public/node_modules"
-    state: link
+  # ansible.builtin.file:
+  #   src: "/var/www/{{ inventory_hostname }}/node_modules/v1"
+  #   dest: "{{ app_deploy_target }}/public/node_modules"
+  #   state: link
+  ansible.builtin.shell: npm install
+  args:
+    chdir: "{{ app_deploy_target }}/public"
 
 # TODO will remove in future
 - name: Install v1 tmp

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

@@ -12,7 +12,7 @@ LOG_CHANNEL=stack
 LOG_DEPRECATIONS_CHANNEL=null
 LOG_LEVEL=info
 
-DB_CONNECTION=postgresql
+DB_CONNECTION=pgsql
 DB_HOST={{ app_postgresql_host }}
 DB_PORT={{ app_postgresql_port }}
 DB_DATABASE={{ app_postgresql_name }}
@@ -57,3 +57,5 @@ MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
 
 ASSETS_SERVER="https://assets-{{ app_cluster_id }}.wikipali.org"
 RPC_SERVER="https://rpc.wikipali.org"
+SNOWFLAKE_DATA_CENTER_ID=1
+SNOWFLAKE_WORKER_ID=1

+ 1 - 0
deploy/roles/ubuntu/tasks/main.yml

@@ -82,6 +82,7 @@
       - python3-certbot-nginx
       - openvpn
       - snmpd
+      - mutt
       - systemd-cron
       - systemd-timesyncd
       - screen

+ 6 - 0
deploy/roles/ubuntu/tasks/zsh.yml

@@ -26,6 +26,12 @@
     path: "{{ansible_env.HOME}}/.zshrc"
     line: 'export PATH=$HOME/.local/bin:$PATH'
 
+
+- name: Setup EDITOR
+  ansible.builtin.lineinfile:
+    path: "{{ansible_env.HOME}}/.zshrc"
+    line: 'export EDITOR=vim'
+
 - name: Use zsh
   become: true
   shell: chsh -s /bin/zsh {{ansible_user}}