From 1b529af997c8df4e73c8c607c89ed4599f20a149 Mon Sep 17 00:00:00 2001 From: Radon Rosborough Date: Sun, 7 Nov 2021 09:32:05 -0800 Subject: [PATCH 1/7] Fix typo --- packer/riju.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packer/riju.service b/packer/riju.service index 6e11ccf..c11177b 100644 --- a/packer/riju.service +++ b/packer/riju.service @@ -11,7 +11,7 @@ ExecStart=riju-supervisor Restart=always RestartSec=5 Environment=AWS_REGION=$AWS_REGION -Environment=ANALYTICS_TAG=ANALYTICS_TAG +Environment=ANALYTICS_TAG=$ANALYTICS_TAG Environment=S3_BUCKET=$S3_BUCKET Environment=SENTRY_DSN=$SENTRY_DSN Environment=SUPERVISOR_ACCESS_TOKEN=$SUPERVISOR_ACCESS_TOKEN From 18bfc4b0c58e1a5ae538b9ccb4c325dece359342 Mon Sep 17 00:00:00 2001 From: Radon Rosborough Date: Sun, 7 Nov 2021 09:40:29 -0800 Subject: [PATCH 2/7] [#138] Add line numbers to C# stack traces --- langs/csharp.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/langs/csharp.yaml b/langs/csharp.yaml index e81e811..3988f44 100644 --- a/langs/csharp.yaml +++ b/langs/csharp.yaml @@ -19,9 +19,9 @@ template: | } compile: | - mcs main.cs + mcs -debug main.cs run: | - mono main.exe + mono --debug main.exe format: run: | From b2de59634297892baa6bd0c87ca16edc6037c002 Mon Sep 17 00:00:00 2001 From: Radon Rosborough Date: Sun, 7 Nov 2021 10:29:34 -0800 Subject: [PATCH 3/7] Mess around more with analytics tag --- backend/server.js | 5 ++++- doc/selfhosting.md | 5 +++-- frontend/pages/app.ejs | 2 +- frontend/pages/index.ejs | 6 +++--- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/backend/server.js b/backend/server.js index 63305c3..457a679 100644 --- a/backend/server.js +++ b/backend/server.js @@ -15,7 +15,10 @@ const host = process.env.HOST || "localhost"; const port = parseInt(process.env.PORT || "") || 6119; const tlsPort = parseInt(process.env.TLS_PORT || "") || 6120; const useTLS = process.env.TLS ? true : false; -const analyticsTag = process.env.ANALYTICS_TAG || ""; +const analyticsTag = (process.env.ANALYTICS_TAG || "").replace( + /^'(.+)'$/, + "$1" +); const langs = await langsPromise; const app = express(); diff --git a/doc/selfhosting.md b/doc/selfhosting.md index 35ef4ab..43bb580 100644 --- a/doc/selfhosting.md +++ b/doc/selfhosting.md @@ -264,8 +264,9 @@ enable all the fun CloudFlare options you'd like. ## Set up analytics (optional) Sign up for Fathom Analytics, enter your domain name, and get a tag -for embedding. Set this as `ANALYTICS_TAG` in your `.env` file (don't -forget the appropriate quoting), and build and roll out a new web AMI. +for embedding. Set this as `ANALYTICS_TAG` in your `.env` file (use +single quoting, as Makefile handling of quotes is a bit nonstandard), +and build and roll out a new web AMI. ## Set up monitoring (optional) diff --git a/frontend/pages/app.ejs b/frontend/pages/app.ejs index 495d279..4b56337 100644 --- a/frontend/pages/app.ejs +++ b/frontend/pages/app.ejs @@ -23,7 +23,7 @@ <% if (analyticsTag) { %> - <%= analyticsTag %> + <%- analyticsTag %> <% } %> diff --git a/frontend/pages/index.ejs b/frontend/pages/index.ejs index fe25f16..ac45a26 100644 --- a/frontend/pages/index.ejs +++ b/frontend/pages/index.ejs @@ -4,6 +4,9 @@ Riju + <% if (analyticsTag) { %> + <%- analyticsTag %> + <% } %>

Riju: fast online playground for every programming language

@@ -30,8 +33,5 @@ <% } else { %> Riju is loading language configuration... <% } %> - <% if (analyticsTag) { %> - <%= analyticsTag %> - <% } %> From fd399a2ad6200706da895be2e3e78f50301a98a2 Mon Sep 17 00:00:00 2001 From: Radon Rosborough Date: Mon, 15 Nov 2021 17:38:08 -0800 Subject: [PATCH 4/7] Temporarily pin to Ubuntu 21.04 Upgrading is hard and the build system makes it super hard to upgrade languages incrementally right now. --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 819a0b4..c2d94d7 100644 --- a/Makefile +++ b/Makefile @@ -52,8 +52,8 @@ ifeq ($(I),lang) @: $${L} node tools/build-lang-image.js --lang $(L) else ifeq ($(I),ubuntu) - docker pull ubuntu:rolling - hash="$$(docker inspect ubuntu:rolling -f '{{ .Id }}' | sha1sum | awk '{ print $$1 }')"; echo "FROM ubuntu:rolling" | docker build --label riju.image-hash="$${hash}" -t riju:$(I) - + docker pull ubuntu:21.04 + hash="$$(docker inspect ubuntu:21.04 -f '{{ .Id }}' | sha1sum | awk '{ print $$1 }')"; echo "FROM ubuntu:21.04" | docker build --label riju.image-hash="$${hash}" -t riju:$(I) - else ifneq (,$(filter $(I),admin ci)) docker build . -f docker/$(I)/Dockerfile -t riju:$(I) $(NO_CACHE) else From 858f612d384c8ac53682076af8dca485c603ce78 Mon Sep 17 00:00:00 2001 From: Radon Rosborough Date: Mon, 15 Nov 2021 17:45:25 -0800 Subject: [PATCH 5/7] Pin more --- docker/admin/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/admin/Dockerfile b/docker/admin/Dockerfile index ea76193..1981d6d 100644 --- a/docker/admin/Dockerfile +++ b/docker/admin/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:rolling +FROM ubuntu:21.04 COPY docker/admin/install.bash /tmp/ RUN /tmp/install.bash From 066c543e3035caf9356cfc0d9c35c40b70a1cee6 Mon Sep 17 00:00:00 2001 From: Radon Rosborough Date: Mon, 15 Nov 2021 18:22:48 -0800 Subject: [PATCH 6/7] Start trying to fix Ante --- langs/ante.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/langs/ante.yaml b/langs/ante.yaml index 2f34309..344e3e1 100644 --- a/langs/ante.yaml +++ b/langs/ante.yaml @@ -9,6 +9,7 @@ install: - cargo - cmake - libssl-dev + - libunwind-dev - pkg-config - python3-distutils manual: | @@ -17,8 +18,8 @@ install: llvmenv init # If compiler is not explicitly set to LLVM, then we get an # error: unrecognized command-line option ‘-Wnewline-eof’. - CC=/usr/bin/clang CXX=/usr/bin/clang++ llvmenv build-entry -G Makefile -j$(nproc) 10.0.0 - llvmenv global 10.0.0 + CC=/usr/bin/clang CXX=/usr/bin/clang++ llvmenv build-entry -G Makefile -j$(nproc) 12.0.1 + llvmenv global 12.0.1 manual: | git clone https://github.com/jfecher/ante.git pushd ante From cf47e68727682e2519b407268ea390e2dade9489 Mon Sep 17 00:00:00 2001 From: Radon Rosborough Date: Mon, 15 Nov 2021 18:22:56 -0800 Subject: [PATCH 7/7] [#139] Downgrade to Node 16.x LTS --- docker/admin/install.bash | 2 +- docker/runtime/install.bash | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/admin/install.bash b/docker/admin/install.bash index 962ae65..d64abb5 100755 --- a/docker/admin/install.bash +++ b/docker/admin/install.bash @@ -19,7 +19,7 @@ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - ubuntu_ver="$(lsb_release -rs)" ubuntu_name="$(lsb_release -cs)" -node_repo="$(curl -sS https://deb.nodesource.com/setup_current.x | grep NODEREPO= | grep -Eo 'node_[0-9]+\.x' | head -n1)" +node_repo="$(curl -sS https://deb.nodesource.com/setup_16.x | grep NODEREPO= | grep -Eo 'node_[0-9]+\.x' | head -n1)" tee -a /etc/apt/sources.list.d/custom.list >/dev/null </dev/null <