mirror of
https://github.com/caprover/caprover
synced 2025-12-12 22:35:39 +00:00
Merge branch 'master' of github.com:caprover/caprover
This commit is contained in:
5
.vscode/settings.json
vendored
5
.vscode/settings.json
vendored
@@ -13,5 +13,8 @@
|
|||||||
},
|
},
|
||||||
"typescript.referencesCodeLens.enabled": true,
|
"typescript.referencesCodeLens.enabled": true,
|
||||||
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
||||||
"cSpell.words": ["csrf", "definitelytyped", "dockerode", "promisified"]
|
"cSpell.words": ["csrf", "definitelytyped", "dockerode", "promisified"],
|
||||||
|
"[shellscript]": {
|
||||||
|
"editor.defaultFormatter": "foxundermoon.shell-format"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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 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 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 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)
|
- Fixed: Allowing dots to be present in repo names [PR-1553](https://github.com/caprover/caprover/pull/1553)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
# Print all commands
|
# Print all commands
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
pwd
|
pwd
|
||||||
|
|
||||||
@@ -16,28 +16,37 @@ else
|
|||||||
echo "Running on CI"
|
echo "Running on CI"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
CAPROVER_VERSION=0.0.1
|
CAPROVER_VERSION=0.0.1
|
||||||
IMAGE_NAME=caprover/caprover-edge
|
IMAGE_NAME=caprover/caprover-edge
|
||||||
|
|
||||||
if [ ! -f ./package-lock.json ]; then
|
if [ ! -f ./package-lock.json ]; then
|
||||||
echo "package-lock.json not found!"
|
echo "package-lock.json not found!"
|
||||||
exit 1;
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# BRANCH=$(git rev-parse --abbrev-ref HEAD)
|
# BRANCH=$(git rev-parse --abbrev-ref HEAD)
|
||||||
# On Github the line above does not work, instead:
|
# On Github the line above does not work, instead:
|
||||||
BRANCH=${GITHUB_REF##*/}
|
BRANCH=${GITHUB_REF##*/}
|
||||||
echo "on branch $BRANCH"
|
echo "on branch $BRANCH"
|
||||||
if [[ "$BRANCH" != "master" ]]; then
|
if [[ "$BRANCH" != "master" ]]; then
|
||||||
echo 'Not on master branch! Aborting script!';
|
echo 'Not on master branch! Aborting script!'
|
||||||
exit 1;
|
exit 1
|
||||||
fi
|
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
|
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
|
||||||
export DOCKER_CLI_EXPERIMENTAL=enabled
|
export DOCKER_CLI_EXPERIMENTAL=enabled
|
||||||
@@ -46,8 +55,8 @@ docker buildx create --name mybuilder
|
|||||||
docker buildx use mybuilder
|
docker buildx use mybuilder
|
||||||
|
|
||||||
# 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/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 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 build -t $IMAGE_NAME:$CAPROVER_VERSION -t $IMAGE_NAME:latest -f dockerfile-captain.edge .
|
||||||
# docker push $IMAGE_NAME:latest
|
# docker push $IMAGE_NAME:latest
|
||||||
# docker push $IMAGE_NAME:$CAPROVER_VERSION
|
# docker push $IMAGE_NAME:$CAPROVER_VERSION
|
||||||
|
|||||||
@@ -15,25 +15,9 @@ RUN npm ci && \
|
|||||||
mv ./edge-override.json ./config-override.json
|
mv ./edge-override.json ./config-override.json
|
||||||
|
|
||||||
|
|
||||||
# Build frontend code.
|
|
||||||
|
|
||||||
# This quick hack invalidates the cache.
|
# This quick hack invalidates the cache.
|
||||||
ADD https://www.google.com /time.now
|
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 NODE_ENV production
|
||||||
ENV PORT 3000
|
ENV PORT 3000
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
|
|||||||
Reference in New Issue
Block a user