From 9a4b90563948cff8101d601240a22d220049a799 Mon Sep 17 00:00:00 2001 From: Matchu Date: Wed, 3 Nov 2021 00:07:30 -0700 Subject: [PATCH] Set up basic nginx in front of impress-2020 It loads kinda! auth0 is crashing us because it refuses to run over http:// but hey! That's pretty cool! --- deploy/playbooks/setup.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/deploy/playbooks/setup.yml b/deploy/playbooks/setup.yml index 2139898..acd51b9 100644 --- a/deploy/playbooks/setup.yml +++ b/deploy/playbooks/setup.yml @@ -86,6 +86,28 @@ - name: Save pm2 startup script command: pm2 save + - name: Install nginx + become: yes + apt: + update_cache: yes + name: nginx + + - name: Add impress-2020 config file to nginx + become: yes + copy: + content: > + server { + listen 80; + server_name impress-2020-box.openneo.net; + # TODO: Serve static files directly, instead of through the proxy + location / { + proxy_pass http://127.0.0.1:3000; + } + } + dest: /etc/nginx/sites-enabled/impress-2020 + notify: + - Restart nginx + - name: Install dependencies for the npm module node-canvas become: yes apt: @@ -97,3 +119,10 @@ - libjpeg-dev - libgif-dev - librsvg2-dev + + handlers: + - name: Restart nginx + become: yes + service: + name: nginx + state: restarted