Browse Source

Use docker-compose.override.yaml

improve-reliability
Luke Childs 4 years ago
parent
commit
2aba7173df
  1. 1
      Vagrantfile
  2. 13
      docker-compose.override.yml
  3. 23
      umbrel-dev

1
Vagrantfile

@ -63,6 +63,7 @@ Vagrant.configure(2) do |config|
config.vm.provision "shell", run: 'always', inline: <<-SHELL
cd /vagrant/getumbrel/umbrel
sudo chown -R 1000:1000 .
chmod -R 700 tor/data/*
./scripts/start
SHELL

13
docker-compose.override.yml

@ -0,0 +1,13 @@
version: '3.7'
services:
dashboard:
build:
context: ../umbrel-dashboard
dockerfile: Dockerfile.dev
volumes:
- ../umbrel-dashboard:/app
manager:
build: ../umbrel-manager
middleware:
build: ../umbrel-middleware

23
umbrel-dev

@ -115,23 +115,12 @@ if [[ "$command" = "init" ]]; then
echo
echo "Cloning container repositories..."
# List of tuples
# github_repo docker_image
repos=(
"getumbrel/umbrel getumbrel/umbrel"
"getumbrel/umbrel-dashboard getumbrel/dashboard"
"getumbrel/umbrel-manager getumbrel/manager"
"getumbrel/umbrel-middleware getumbrel/middleware"
)
for ((i = 0; i < ${#repos[@]}; i++)); do
repo="${repos[$i]}"
github_repo="$(echo $repo | cut -d' ' -f1)"
docker_repo="$(echo $repo | cut -d' ' -f2)"
echo
git clone "https://github.com/$github_repo.git" "$github_repo"
if [[ "$github_repo" != "getumbrel/umbrel" ]]; then
echo
echo "Patching docker-compose.yml to build $github_repo container from source..."
$gnused -i "s#image: $docker_repo\:.*#build: \.\.\/\.\.\/$github_repo#g" getumbrel/umbrel/docker-compose.yml
# repo docker_image
repos="getumbrel/umbrel getumbrel/umbrel-dashboard getumbrel/umbrel-manager getumbrel/umbrel-middleware"
for repo in $repos; do
echo git clone "https://github.com/$repo.git" "$repo"
if [[ "$repo" != "getumbrel/umbrel" ]]; then
cp "$(get_script_location)/docker-compose.override.yml" "$repo/"
fi
done

Loading…
Cancel
Save