Merge branch 'master' of github.com:caprover/caprover

This commit is contained in:
Kasra Bigdeli
2023-05-11 10:17:01 -07:00
4 changed files with 25 additions and 28 deletions

View File

@@ -13,5 +13,8 @@
},
"typescript.referencesCodeLens.enabled": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"cSpell.words": ["csrf", "definitelytyped", "dockerode", "promisified"]
"cSpell.words": ["csrf", "definitelytyped", "dockerode", "promisified"],
"[shellscript]": {
"editor.defaultFormatter": "foxundermoon.shell-format"
}
}

View File

@@ -8,6 +8,7 @@
- Improved: Added support for overwriting app defaults NGINX config [PR-1377](https://github.com/caprover/caprover/pull/1377)
- Improved: Added support for app tags for grouping [PR-118](https://github.com/caprover/caprover-frontend/pull/118)
- Improved: Added support for overriding mesh network settings and using an existing Docker Swarm [56e739c](https://github.com/caprover/caprover/commit/56e739c0f57ce873bf8d032de838c415548041b7)
- Improved: Added support for domain aliases (redirecting to spacific domains) [PR-1744](https://github.com/caprover/caprover/pull/1744)
- Fixed: Allowing dots to be present in repo names [PR-1553](https://github.com/caprover/caprover/pull/1553)

View File

@@ -16,28 +16,37 @@ else
echo "Running on CI"
fi
CAPROVER_VERSION=0.0.1
IMAGE_NAME=caprover/caprover-edge
if [ ! -f ./package-lock.json ]; then
echo "package-lock.json not found!"
exit 1;
exit 1
fi
# BRANCH=$(git rev-parse --abbrev-ref HEAD)
# On Github the line above does not work, instead:
BRANCH=${GITHUB_REF##*/}
echo "on branch $BRANCH"
if [[ "$BRANCH" != "master" ]]; then
echo 'Not on master branch! Aborting script!';
exit 1;
echo 'Not on master branch! Aborting script!'
exit 1
fi
## Building frontend app
ORIG_DIR=$(pwd)
FRONTEND_DIR=/home/runner/app-frontend
curl -Iv https://registry.yarnpkg.com/
mkdir -p $FRONTEND_DIR && cd $FRONTEND_DIR
git clone https://github.com/githubsaturn/caprover-frontend.git
cd caprover-frontend
git log --max-count=1
yarn install --no-cache --frozen-lockfile --network-timeout 600000
echo "Installation finished"
yarn run build
echo "Building finished"
cd $ORIG_DIR
mv $FRONTEND_DIR/caprover-frontend/build ./dist-frontend
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
export DOCKER_CLI_EXPERIMENTAL=enabled

View File

@@ -15,25 +15,9 @@ RUN npm ci && \
mv ./edge-override.json ./config-override.json
# Build frontend code.
# This quick hack invalidates the cache.
ADD https://www.google.com /time.now
# 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 && \
RUN curl -Iv https://registry.yarnpkg.com/ && \
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 && \
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
ENV NODE_ENV production
ENV PORT 3000
EXPOSE 3000