Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
a4cf4668cb
4
Makefile
4
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
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
FROM ubuntu:rolling
|
||||
FROM ubuntu:21.04
|
||||
|
||||
COPY docker/admin/install.bash /tmp/
|
||||
RUN /tmp/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 <<EOF
|
||||
deb [arch=amd64] https://apt.releases.hashicorp.com ${ubuntu_name} main
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
</script>
|
||||
<script src="/js/app.js" defer></script>
|
||||
<% if (analyticsTag) { %>
|
||||
<%= analyticsTag %>
|
||||
<%- analyticsTag %>
|
||||
<% } %>
|
||||
</head>
|
||||
<body>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -19,9 +19,9 @@ template: |
|
|||
}
|
||||
|
||||
compile: |
|
||||
mcs main.cs
|
||||
mcs -debug main.cs
|
||||
run: |
|
||||
mono main.exe
|
||||
mono --debug main.exe
|
||||
|
||||
format:
|
||||
run: |
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue