Prechádzať zdrojové kódy

Update caddy config, update yarn start cmd

Anuj Bansal 3 rokov pred
rodič
commit
0384ec5b3f

+ 14 - 2
devops/aws/docker-setup-playbook.yml

@@ -47,8 +47,8 @@
       command: yarn start
       args:
         chdir: '{{ remote_code_path }}'
-      async: 180
-      poll: 0
+      environment:
+        PERSIST: true
 
     - name: Set nip.io domain with IP
       set_fact:
@@ -64,3 +64,15 @@
         caddy_config: "{{ lookup('template', 'templates/Caddyfile.j2') }}"
         caddy_systemd_capabilities_enabled: true
         caddy_update: false
+
+    - name: Print endpoints
+      debug:
+        msg:
+          - 'The services should now be accesible at:'
+          - 'Pioneer: {{ nip_domain }}/pioneer/'
+          - 'WebSocket RPC: {{ nip_domain }}/ws-rpc'
+          - 'HTTP RPC: {{ nip_domain }}/http-rpc'
+          - 'Colossus: {{ nip_domain }}/colossus'
+          - 'Distributor: {{ nip_domain }}/distributor'
+          - 'GraphQL server: {{ nip_domain }}/graphql'
+          - 'Indexer: {{ nip_domain }}/indexer'

+ 8 - 4
devops/aws/templates/Caddyfile.j2

@@ -1,8 +1,10 @@
-{{ nip_domain }}/ws-rpc {
+{{ nip_domain }}/ws-rpc* {
+    uri strip_prefix /ws-rpc
     reverse_proxy localhost:9944
 }
 
-{{ nip_domain }}/http-rpc {
+{{ nip_domain }}/http-rpc* {
+    uri strip_prefix /http-rpc
     reverse_proxy localhost:9933
 }
 
@@ -11,11 +13,13 @@
     reverse_proxy localhost:3000
 }
 
-{{ nip_domain }}/colossus {
+{{ nip_domain }}/colossus* {
+    uri strip_prefix /colossus
     reverse_proxy localhost:3333
 }
 
-{{ nip_domain }}/distributor {
+{{ nip_domain }}/distributor* {
+    uri strip_prefix /distributor
     reverse_proxy localhost:3334
 }