Skip to content

Commit

Permalink
Merge pull request #1179 from caprover/master
Browse files Browse the repository at this point in the history
Release 1.10.0
  • Loading branch information
githubsaturn committed Sep 4, 2021
2 parents a9c3319 + 51e76e7 commit 270ac9b
Show file tree
Hide file tree
Showing 64 changed files with 11,323 additions and 3,374 deletions.
6 changes: 6 additions & 0 deletions .eslintignore
@@ -0,0 +1,6 @@
# don't ever lint node_modules
node_modules
# don't lint build output (make sure it's set to your correct build folder name)
built
# don't lint nyc coverage output
coverage
23 changes: 23 additions & 0 deletions .eslintrc.js
@@ -0,0 +1,23 @@
// eslint-disable-next-line no-undef
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
plugins: [
'@typescript-eslint',
],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
],
"rules": {
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-this-alias": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/ban-ts-comment": "off",
"no-case-declarations": "off",
"no-useless-escape": "off",

}
};
28 changes: 14 additions & 14 deletions .github/workflows/build_project.yml
@@ -1,19 +1,19 @@
name: Run build

on:
push:
branches:
- master
pull_request:
branches:
- master
push:
branches:
- master
pull_request:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 10
- run: sudo mkdir /captain && npm ci && npm run build && sudo npm run test
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 10
- run: sudo mkdir /captain && npm ci && npm run build && sudo npm run test
28 changes: 14 additions & 14 deletions .github/workflows/format_project.yml
@@ -1,19 +1,19 @@
name: Run formatter

on:
push:
branches:
- master
pull_request:
branches:
- master
push:
branches:
- master
pull_request:
branches:
- master

jobs:
check-code-formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 10
- run: npm ci && npm run formatter
check-code-formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 10
- run: npm ci && npm run formatter
28 changes: 14 additions & 14 deletions .github/workflows/lint_project.yml
@@ -1,19 +1,19 @@
name: Run lint

on:
push:
branches:
- master
pull_request:
branches:
- master
push:
branches:
- master
pull_request:
branches:
- master

jobs:
run-tslint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 10
- run: npm ci && npm run tslint
run-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 10
- run: npm ci && npm run lint
2 changes: 1 addition & 1 deletion .github/workflows/publish_edge.yml
Expand Up @@ -17,7 +17,7 @@ jobs:
sudo mkdir /captain
npm ci
npm run build
npm run tslint
npm run lint
npm run formatter
sudo npm run test
build-publish-docker-hub:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish_release.yml
Expand Up @@ -17,7 +17,7 @@ jobs:
sudo mkdir /captain
npm ci
npm run build
npm run tslint
npm run lint
npm run formatter
sudo npm run test
build-publish-docker-hub:
Expand Down
6 changes: 3 additions & 3 deletions .vscode/extensions.json
@@ -1,10 +1,10 @@
{
"recommendations": [
"eg2.tslint",
"streetsidesoftware.code-spell-checker",
"pflannery.vscode-versionlens",
"remimarsal.prettier-now",
"hookyqr.beautify",
"esbenp.prettier-vscode"
"esbenp.prettier-vscode",
"dbaeumer.vscode-eslint"
]
}
}
10 changes: 4 additions & 6 deletions .vscode/settings.json
Expand Up @@ -3,17 +3,15 @@
"search.exclude": {
"**/node_modules": true,
"**/bower_components": true,
"**/dist": true,
"**/built": true,
"**/coverge": true
},
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": true
"source.organizeImports": true,
"source.fixAll.eslint": true
},
"typescript.referencesCodeLens.enabled": true,
"tslint.ignoreDefinitionFiles": false,
"tslint.autoFixOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"tslint.exclude": "**/node_modules/**/*",
"cSpell.words": ["csrf", "definitelytyped", "promisified"]
"cSpell.words": ["csrf", "definitelytyped", "dockerode", "promisified"]
}
13 changes: 12 additions & 1 deletion CHANGELOG.md
@@ -1,6 +1,17 @@
## [Next Version - available as `edge`]

- TBD.
- TBD

## [1.10.0] - 2021-08-31

- Fixed: Editing a docker remote registry does not trigger an authentication check [Issue-1027](https://github.com/caprover/caprover/issues/1027)
- Fixed: Show Password caches the modal in registry [Issue-69](https://github.com/caprover/caprover-frontend/issues/69)
- Fixed: Remember Me throws an error if the server restarts [Issue-1056](https://github.com/caprover/caprover/issues/1056)
- New: Now git sha values are available during the build process and runtime as `CAPROVER_GIT_COMMIT_SHA` [PR-1094](https://github.com/caprover/caprover/pull/1049/files)
- New: UI components and typeface are now more modern looking
- New: Support for app tokens [Issue-698](https://github.com/caprover/caprover/issues/698)
- New: Support for Markdown formatting in one click apps [Issue-1151](https://github.com/caprover/caprover/issues/1151)
- Update: npm modules updated to the latest versions.

## [1.9.0] - 2021-02-15

Expand Down
9 changes: 9 additions & 0 deletions SECURITY.md
@@ -0,0 +1,9 @@
# Security Policy

## Supported Versions
Only the last version receives security patches. To receive the security patches, you must make sure that your instances is using the most recent release.

## Reporting a Vulnerability

Security issues are high priority and they will be addressed immediately. If you find a security issue, please do not post as a public issue, instead, please email it to us: security at caprover dot com.

Binary file modified captain-sample-apps/go-sample.tar
Binary file not shown.
9 changes: 7 additions & 2 deletions dev-scripts/build_and_push_edge.sh
Expand Up @@ -16,7 +16,6 @@ else
echo "Running on CI"
fi

docker run --rm --privileged multiarch/qemu-user-static --reset -p yes

CAPROVER_VERSION=0.0.1
IMAGE_NAME=caprover/caprover-edge
Expand All @@ -40,9 +39,15 @@ fi



docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
export DOCKER_CLI_EXPERIMENTAL=enabled
docker buildx ls
docker buildx create --name mybuilder
docker buildx use mybuilder

docker buildx build --platform linux/amd64,linux/arm64,linux/arm -t $IMAGE_NAME:$CAPROVER_VERSION -t $IMAGE_NAME:latest -f dockerfile-captain.edge --push .
# docker buildx build --platform linux/arm -t $IMAGE_NAME:$CAPROVER_VERSION -t $IMAGE_NAME:latest -f dockerfile-captain.edge --push .
docker buildx build --platform linux/amd64,linux/arm64,linux/arm -t $IMAGE_NAME:$CAPROVER_VERSION -t $IMAGE_NAME:latest -f dockerfile-captain.edge --push .

# docker build -t $IMAGE_NAME:$CAPROVER_VERSION -t $IMAGE_NAME:latest -f dockerfile-captain.edge .
# docker push $IMAGE_NAME:latest
# docker push $IMAGE_NAME:$CAPROVER_VERSION
6 changes: 3 additions & 3 deletions dev-scripts/digitalocean-oneclick-app-generator
Expand Up @@ -2,14 +2,14 @@
# https://github.com/digitalocean/marketplace-partners/blob/master/marketplace_docs/build-an-image.md#cleaning-up-your-build-droplet


apt -y update && apt -y full-upgrade
apt -y update && apt -y full-upgrade && apt autoclean -y && apt autoremove -y



############################ WAIT


docker pull caprover/caprover:1.8.0
docker pull caprover/caprover:1.9.0


cd /var/lib/cloud/scripts/per-instance
Expand All @@ -23,7 +23,7 @@ cat <<EOT >> z_01_caprover_installation.sh

ufw allow 80,443,3000,996,7946,4789,2377/tcp; ufw allow 7946,4789,2377/udp;

docker run -p 80:80 -p 443:443 -p 3000:3000 -v /var/run/docker.sock:/var/run/docker.sock -v /captain:/captain caprover/caprover:1.8.0
docker run -p 80:80 -p 443:443 -p 3000:3000 -v /var/run/docker.sock:/var/run/docker.sock -v /captain:/captain caprover/caprover:1.9.0


EOT
Expand Down
1 change: 1 addition & 0 deletions dev-scripts/play_with_caprover.sh
Expand Up @@ -52,6 +52,7 @@ echo "{
\"customDomain\": \"${CAPROVER_ROOT_DOMAIN}\"
}" > /captain/data/config-captain.json
cat /captain/data/config-captain.json
echo "{\"skipVerifyingDomains\":\"true\"}" > /captain/data/config-override.json
docker container prune --force
docker service scale captain-captain=1

Expand Down
3 changes: 2 additions & 1 deletion dockerfile-captain.debug
@@ -1,5 +1,6 @@
FROM node:14
RUN apt-get update
RUN apt-get update && apt-get full-upgrade -yqq && apt-get install build-essential cmake -yqq

RUN apt-get -y install netcat socat
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
Expand Down
17 changes: 8 additions & 9 deletions dockerfile-captain.edge
@@ -1,18 +1,15 @@
FROM node:14-alpine

RUN apk update && apk upgrade && \
apk add --no-cache bash git openssh openssl
FROM node:14
RUN apt-get update && apt-get full-upgrade -yqq && apt-get install build-essential cmake -yqq

RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app



# Build backend code

COPY . /usr/src/app

RUN npm install --production && \
RUN npm ci && \
npm cache clean --force && \
npm run build && \
mv ./edge-override.json ./config-override.json
Expand All @@ -23,12 +20,14 @@ RUN npm install --production && \
# This quick hack invalidates the cache
ADD https://www.google.com /time.now

RUN mkdir -p /usr/src/app-frontend && cd /usr/src/app-frontend && \
# armV7 fails: https://github.com/yarnpkg/yarn/issues/5259 https://github.com/nodejs/docker-node/issues/1335
RUN curl -Iv https://registry.yarnpkg.com/@ant-design/icons-svg/-/icons-svg-4.1.0.tgz && \
mkdir -p /usr/src/app-frontend && cd /usr/src/app-frontend && \
git clone https://github.com/githubsaturn/caprover-frontend.git && \
cd caprover-frontend && \
git log --max-count=1 && \
npm install --production && npm cache clean --force && \
npm run build && \
yarn install --no-cache --frozen-lockfile --network-timeout 600000 && echo "Installation finished" && \
yarn run build && echo "Building finished" && \
mv ./build ../../app/dist-frontend && \
cd / && \
rm -rf /usr/src/app-frontend
Expand Down
17 changes: 11 additions & 6 deletions dockerfile-captain.release
@@ -1,12 +1,15 @@
FROM node:14
RUN apt-get update && apt-get full-upgrade -yqq && apt-get install build-essential cmake -yqq

RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app


# Build backend code.
# Build backend code

COPY . /usr/src/app
RUN npm install --production && \

RUN npm ci && \
npm cache clean --force && \
npm run build

Expand All @@ -15,14 +18,16 @@ RUN npm install --production && \

# Build frontend code using a fixed hash commit.

ENV FRONTEND_COMMIT_HASH e2dc2415860d5d1096096f06fc204e6b186110bf
ENV FRONTEND_COMMIT_HASH 3a5f5d584e1e51ac22f07dea09be171bec9425a5

RUN mkdir -p /usr/src/app-frontend && cd /usr/src/app-frontend && \
# armV7 fails: https://github.com/yarnpkg/yarn/issues/5259 https://github.com/nodejs/docker-node/issues/1335
RUN curl -Iv https://registry.yarnpkg.com/@ant-design/icons-svg/-/icons-svg-4.1.0.tgz && \
mkdir -p /usr/src/app-frontend && cd /usr/src/app-frontend && \
git clone https://github.com/githubsaturn/caprover-frontend.git && \
cd caprover-frontend && \
git reset --hard ${FRONTEND_COMMIT_HASH} && \
npm install --production && npm cache clean --force && \
npm run build && \
yarn install --no-cache --frozen-lockfile --network-timeout 600000 && echo "Installation finished" && \
yarn run build && echo "Building finished" && \
mv ./build ../../app/dist-frontend && \
cd / && \
rm -rf /usr/src/app-frontend
Expand Down
1 change: 1 addition & 0 deletions jest.config.js
@@ -1,3 +1,4 @@
/* eslint-disable no-undef */
module.exports = {
transform: {
"^.+\\.tsx?$": "ts-jest",
Expand Down

0 comments on commit 270ac9b

Please sign in to comment.