Merge branch 'v3' into v3-remove-privilege

This commit is contained in:
Victor Frazao 2021-04-06 09:42:32 -04:00 committed by GitHub
commit 288c9e2611
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
74 changed files with 1949 additions and 1679 deletions

View file

@ -1,23 +1,28 @@
FROM node:15.8.0-buster-slim
ENV DEBIAN_FRONTEND noninteractive
ENV DEBIAN_FRONTEND=noninteractive
RUN dpkg-reconfigure -p critical dash
RUN for i in $(seq 1001 1500); do \
groupadd -g $i runner$i && \
useradd -M runner$i -g $i -u $i ; \
done
RUN apt-get update && \
apt-get install -y libxml2 gnupg tar coreutils util-linux libc6-dev binutils build-essential locales libpcre3-dev libevent-dev libgmp3-dev libncurses6 libncurses5 libedit-dev libseccomp-dev && \
apt-get install -y libxml2 gnupg tar coreutils util-linux libc6-dev \
binutils build-essential locales libpcre3-dev libevent-dev libgmp3-dev \
libncurses6 libncurses5 libedit-dev libseccomp-dev && \
rm -rf /var/lib/apt/lists/*
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && locale-gen
ENV NODE_ENV=production
WORKDIR /piston_api
COPY ["package.json", "yarn.lock", "./"]
RUN yarn
COPY ["package.json", "package-lock.json", "./"]
RUN npm i
COPY ./src ./src
RUN make -C ./src/nosocket/ all && make -C ./src/nosocket/ install
CMD [ "node", "src", "-m", "-c", "/piston/config.yaml"]
EXPOSE 6969/tcp
EXPOSE 2000/tcp

1328
api/package-lock.json generated Normal file

File diff suppressed because it is too large Load diff

View file

@ -45,7 +45,7 @@ const options = [
{
key: 'bind_address',
desc: 'Address to bind REST API on\nThank @Bones for the number',
default: '0.0.0.0:6969',
default: '0.0.0.0:2000',
validators: []
},
{

View file

@ -92,7 +92,6 @@ const app = express();
return {
language: rt.language,
version: rt.version.raw,
author: rt.author,
aliases: rt.aliases
};
});

View file

@ -14,12 +14,11 @@ class Runtime {
fss.read_file_sync(path.join(package_dir, 'pkg-info.json'))
);
const { language, version, author, build_platform, aliases } = info;
const { language, version, build_platform, aliases } = info;
this.pkgdir = package_dir;
this.language = language;
this.version = semver.parse(version);
this.author = author;
this.aliases = aliases;
if (build_platform !== globals.platform) {

File diff suppressed because it is too large Load diff