dev: Self Hosting with private repo fixes (#2787)

* fixes to self hosting

* self hosting fixes

* removed .temp

* wip

* wip

* self install private repo

* folder change

* fix

---------

Co-authored-by: sriram veeraghanta <veeraghanta.sriram@gmail.com>
This commit is contained in:
Manish Gupta 2023-11-17 11:51:54 +05:30 committed by GitHub
parent dd60dec887
commit 0a88db975a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 2 deletions

1
.gitignore vendored
View File

@ -79,3 +79,4 @@ pnpm-workspace.yaml
tmp/ tmp/
## packages ## packages
dist dist
.temp/

View File

@ -1,9 +1,8 @@
#!/bin/bash #!/bin/bash
BRANCH=${BRANCH:-master} BRANCH=master
SCRIPT_DIR=$PWD SCRIPT_DIR=$PWD
PLANE_INSTALL_DIR=$PWD/plane-app PLANE_INSTALL_DIR=$PWD/plane-app
mkdir -p $PLANE_INSTALL_DIR/archive
function install(){ function install(){
echo echo
@ -28,7 +27,20 @@ function download(){
mv $PLANE_INSTALL_DIR/variables-upgrade.env $PLANE_INSTALL_DIR/.env mv $PLANE_INSTALL_DIR/variables-upgrade.env $PLANE_INSTALL_DIR/.env
fi fi
if [ "$BRANCH" != "master" ];
then
cp $PLANE_INSTALL_DIR/docker-compose.yaml $PLANE_INSTALL_DIR/temp.yaml
sed -e 's@plane-frontend:@plane-frontend-private:@g' \
-e 's@plane-space:@plane-space-private:@g' \
-e 's@plane-backend:@plane-backend-private:@g' \
-e 's@plane-proxy:@plane-proxy-private:@g' \
-e 's@${APP_RELEASE:-latest}@'"$BRANCH"'@g' \
$PLANE_INSTALL_DIR/temp.yaml > $PLANE_INSTALL_DIR/docker-compose.yaml
rm $PLANE_INSTALL_DIR/temp.yaml
fi
echo "" echo ""
echo "Latest version is now available for you to use" echo "Latest version is now available for you to use"
echo "" echo ""
@ -108,4 +120,10 @@ function askForAction(){
fi fi
} }
if [ "$BRANCH" != "master" ];
then
PLANE_INSTALL_DIR=$PWD/plane-app-$(echo $BRANCH | sed -r 's@(\/|" "|\.)@-@g')
fi
mkdir -p $PLANE_INSTALL_DIR/archive
askForAction askForAction