mirror of
https://github.com/caprover/caprover
synced 2025-12-10 13:25:39 +00:00
* Fixed https://github.com/caprover/caprover/issues/2112
* Updated changelog
* Force rebuild to capture the frontend change
* Updated changelog
* added fallback ip for installation if public ip not found
* Added project definition to the config
* Added project router
* Updated apps router
* Fixed update path
* Added parent ID for projects
* Typo fix
* Not allow parent to be deleted if there are sub projects
* Fixed typo in string template
* Allow register project to accept description
* Added functionality to remove multiple projects
* Fixed the project deletion
* Fixed the project deletion
* Close https://github.com/caprover/caprover/issues/2153
* Added changelog
* updated changelog
* Updated changelog
* Better error
* Force build
* add MariaDB to README.md
* Improved MacOs startup
* Added theme on backend (#2161)
* Added theme on backend
* Added themes
* Added another theme
* Updated changelog
* Reformat
* Improved dev code
* Improved dev code
* Added another theme
* Updated packages (#2165)
* Updated packages
* Updated packages
* Fixed formatting
* Fixed tests
* Returning project upon creation
* Preparing release
* updated frontend
* Added some test to fix node 20
* Revert "Added some test to fix node 20"
This reverts commit 18a59794b8.
* Updated changelog
---------
Co-authored-by: Robert Silén <robert.silen@mariadb.org>
66 lines
2.0 KiB
Bash
Executable File
66 lines
2.0 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# Exit early if any command fails
|
|
set -e
|
|
|
|
# Print all commands
|
|
set -x
|
|
|
|
pwd
|
|
|
|
# ensure you're not running it on local machine
|
|
if [ -z "$CI" ] || [ -z "$GITHUB_REF" ]; then
|
|
echo "Running on a local machine! Exiting!"
|
|
exit 127
|
|
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
|
|
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
|
|
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
|
|
|
|
sudo apt-get update && sudo apt-get install qemu-user-static
|
|
# docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
|
|
docker run --rm --privileged tonistiigi/binfmt --install all
|
|
# export DOCKER_CLI_EXPERIMENTAL=enabled
|
|
docker buildx ls
|
|
docker buildx rm mybuilder || echo "mybuilder not found"
|
|
docker buildx create --name 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/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
|