Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Jason Steving 2021-11-17 18:07:46 -07:00
commit a4cf4668cb
11 changed files with 22 additions and 17 deletions

View File

@ -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

View File

@ -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();

View File

@ -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)

View File

@ -1,4 +1,4 @@
FROM ubuntu:rolling
FROM ubuntu:21.04
COPY docker/admin/install.bash /tmp/
RUN /tmp/install.bash

View File

@ -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 <<EOF
deb [arch=amd64] https://apt.releases.hashicorp.com ${ubuntu_name} main

View File

@ -23,7 +23,7 @@ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
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 <<EOF
deb [arch=amd64] https://deb.nodesource.com/${node_repo} ${ubuntu_name} main

View File

@ -23,7 +23,7 @@
</script>
<script src="/js/app.js" defer></script>
<% if (analyticsTag) { %>
<%= analyticsTag %>
<%- analyticsTag %>
<% } %>
</head>
<body>

View File

@ -4,6 +4,9 @@
<meta charset="utf-8" />
<title>Riju</title>
<link rel="stylesheet" href="/css/index.css" />
<% if (analyticsTag) { %>
<%- analyticsTag %>
<% } %>
</head>
<body>
<h1>Riju: <i>fast</i> online playground for every programming language</h1>
@ -30,8 +33,5 @@
<% } else { %>
<i>Riju is loading language configuration...</i>
<% } %>
<% if (analyticsTag) { %>
<%= analyticsTag %>
<% } %>
</body>
</html>

View File

@ -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

View File

@ -19,9 +19,9 @@ template: |
}
compile: |
mcs main.cs
mcs -debug main.cs
run: |
mono main.exe
mono --debug main.exe
format:
run: |

View File

@ -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