-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add the beginnings of a test suite - need to look into adding GitHub …
…Actions. Fix local error with streaming .wasm files without proper MIME type set. Run prettier over entire codebase. Add accessibility for xterm.js and Codemirror.
- Loading branch information
Showing
32 changed files
with
12,682 additions
and
884 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
.idea | ||
node_modules | ||
build/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
node_modules | ||
dist | ||
js/lib | ||
package-lock.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
SHELL = /bin/bash | ||
|
||
.PHONY: build | ||
build: docker-compose.override.yml | ||
docker-compose run --rm web npm run build | ||
|
||
.PHONY: test | ||
test: docker-compose.override.yml | ||
docker-compose run --rm test npm run test | ||
|
||
docker-compose.override.yml: | ||
@echo "version: '3'" > docker-compose.override.yml | ||
@echo >> docker-compose.override.yml | ||
@echo "services:" >> docker-compose.override.yml | ||
@echo " web:" >> docker-compose.override.yml | ||
@echo " user: `id -u`:`id -g`" >> docker-compose.override.yml | ||
|
||
dist/js/app.js: | ||
dist/js/app.js: build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
theme: jekyll-theme-slate | ||
theme: jekyll-theme-slate |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,27 @@ | ||
version: "3.1" | ||
version: '3.1' | ||
|
||
services: | ||
web: | ||
image: httpd:2.4-alpine | ||
image: code-sandbox | ||
volumes: | ||
- ./:/usr/local/apache2/htdocs | ||
- ./docker/web/httpd.conf:/usr/local/apache2/conf/httpd.conf | ||
build: | ||
context: ./docker/web/ | ||
ports: | ||
- 8000:80 | ||
|
||
test: | ||
image: code-sandbox-test | ||
volumes: | ||
- ./:/src/ | ||
build: | ||
context: ./docker/test/ | ||
depends_on: | ||
- web | ||
links: | ||
- web | ||
# https://stackoverflow.com/a/53975412/3145856 | ||
# https://github.com/docker/compose/issues/5574 | ||
security_opt: | ||
- seccomp:"./docker/test/chrome.json" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
FROM node:slim | ||
|
||
# Install latest chrome dev package and fonts to support major charsets (Chinese, Japanese, Arabic, Hebrew, Thai and a few others) | ||
# Note: this installs the necessary libs to make the bundled version of Chromium that Puppeteer | ||
# installs, work. | ||
RUN apt-get update \ | ||
&& apt-get install -y wget gnupg \ | ||
&& wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \ | ||
&& sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \ | ||
&& apt-get update \ | ||
&& apt-get install -y google-chrome-stable fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst fonts-freefont-ttf libxss1 \ | ||
--no-install-recommends \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# If running Docker >= 1.13.0 use docker run's --init arg to reap zombie processes, otherwise | ||
# uncomment the following lines to have `dumb-init` as PID 1 | ||
# ADD https://github.com/Yelp/dumb-init/releases/download/v1.2.2/dumb-init_1.2.2_x86_64 /usr/local/bin/dumb-init | ||
# RUN chmod +x /usr/local/bin/dumb-init | ||
# ENTRYPOINT ["dumb-init", "--"] | ||
|
||
# Uncomment to skip the chromium download when installing puppeteer. If you do, | ||
# you'll need to launch puppeteer with: | ||
# browser.launch({executablePath: 'google-chrome-stable'}) | ||
# ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true | ||
|
||
WORKDIR /home/pptruser | ||
|
||
# Install puppeteer so it's available in the container. | ||
RUN npm install -g npm@latest \ | ||
&& npm init -y \ | ||
&& npm i puppeteer \ | ||
# Add user so we don't need --no-sandbox. | ||
# same layer as npm install to keep re-chowned files from using up several hundred MBs more space | ||
&& groupadd -r pptruser && useradd -r -g pptruser -G audio,video pptruser \ | ||
&& mkdir -p /home/pptruser/Downloads \ | ||
&& chown -R pptruser:pptruser /home/pptruser \ | ||
&& chmod -R 777 /tmp \ | ||
&& apt-get update \ | ||
&& apt-get install -y socat \ | ||
&& npm config set update-notifier false | ||
|
||
COPY ./entrypoint.sh /usr/local/bin/entrypoint.sh | ||
|
||
RUN chmod +x /usr/local/bin/entrypoint.sh | ||
|
||
# Run everything after as non-privileged user. | ||
USER pptruser | ||
|
||
ENTRYPOINT ["bash", "/usr/local/bin/entrypoint.sh"] |
Oops, something went wrong.