Browse Source

Install Umbrel v0.1.4-beta (#47)

* Updates for Umbrel v0.1.4-beta

* Fix UMBREL_ROOT default path
master v0.0.4-beta.3
Mayank Chhabra 5 years ago
committed by GitHub
parent
commit
2b3bef07c4
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      .github/workflows/on-tag-only.yml
  2. 1
      stage2/05-docker-compose/00-packages
  3. 4
      stage2/05-docker-compose/01-run.sh
  4. 21
      stage2/05-docker-compose/files/compose-service

2
.github/workflows/on-tag-only.yml

@ -55,7 +55,7 @@ jobs:
with: with:
tag_name: ${{ github.ref }} tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }} release_name: Release ${{ github.ref }}
draft: false draft: true
prerelease: false prerelease: false
- name: Upload image - name: Upload image

1
stage2/05-docker-compose/00-packages

@ -1 +1,2 @@
git git
fswatch

4
stage2/05-docker-compose/01-run.sh

@ -6,7 +6,7 @@ echo "Installing docker-compose from pip3, and also setting up the box folder st
on_chroot << EOF on_chroot << EOF
pip3 install docker-compose pip3 install docker-compose
cd /home/${FIRST_USER_NAME} cd /home/${FIRST_USER_NAME}
wget -qO- "https://raw.githubusercontent.com/getumbrel/umbrel/v0.1.3-beta/install-box.sh" | sh wget -qO- "https://raw.githubusercontent.com/getumbrel/umbrel/v0.1.4-beta/install-box.sh" | sh
chown -R ${FIRST_USER_NAME}:${FIRST_USER_NAME} /home/${FIRST_USER_NAME} chown -R ${FIRST_USER_NAME}:${FIRST_USER_NAME} /home/${FIRST_USER_NAME}
EOF EOF
@ -31,7 +31,7 @@ cp files/compose-service ${ROOTFS_DIR}/etc/init.d/umbrelbox
echo "Pulling Docker images required to run Umbrel services" echo "Pulling Docker images required to run Umbrel services"
wget -q "https://raw.githubusercontent.com/getumbrel/umbrel/v0.1.3-beta/docker-compose.yml" wget -q "https://raw.githubusercontent.com/getumbrel/umbrel/v0.1.4-beta/docker-compose.yml"
IMAGES=$(grep '^\s*image' docker-compose.yml | sed 's/image://' | sed 's/\"//g' | sed '/^$/d;s/[[:blank:]]//g' | sort | uniq) IMAGES=$(grep '^\s*image' docker-compose.yml | sed 's/image://' | sed 's/\"//g' | sed '/^$/d;s/[[:blank:]]//g' | sort | uniq)
echo "List of images to download: $IMAGES" echo "List of images to download: $IMAGES"

21
stage2/05-docker-compose/files/compose-service

@ -16,29 +16,30 @@ set -e
NAME="compose-service" NAME="compose-service"
DESCRIPTION="Docker compose service" DESCRIPTION="Docker compose service"
SCRIPTNAME=/etc/init.d/$NAME SCRIPTNAME=/etc/init.d/$NAME
UMBREL_ROOT=/home/umbrel
case "$1" in case "$1" in
start) start)
if [ -f /home/umbrel/docker-compose.yml ]; then if [ -f $UMBREL_ROOT/docker-compose.yml ]; then
sed -i 's/\${HOME}/\/home\/umbrel/g; ' /home/umbrel/docker-compose.yml cd $UMBREL_ROOT
echo "Starting" echo "Starting karen"
cd /home/umbrel ./karen &
echo "Starting Umbrel Docker services"
docker-compose up --build -d docker-compose up --build -d
exit 0 exit 0
else else
echo "Docker-compose file doesn't exist" echo "Cannot start umbrelbox service. No docker-compose.yml found in $UMBREL_ROOT"
exit 1 exit 1
fi fi
;; ;;
stop) stop)
if [ -f /home/umbrel/docker-compose.yml ]; then if [ -f $UMBREL_ROOT/docker-compose.yml ]; then
sed -i 's/\${HOME}/\/home\/umbrel/g; ' /home/umbrel/docker-compose.yml echo "Stopping Umbrel Docker services"
echo "Stopping docker" cd $UMBREL_ROOT
cd /home/umbrel
docker-compose down docker-compose down
exit 0 exit 0
else else
echo "Docker-compose file doesn't exist" echo "Cannot stop umbrelbox service. No docker-compose.yml found in $UMBREL_ROOT"
exit 1 exit 1
fi fi
;; ;;

Loading…
Cancel
Save