-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
ddev-install.sh
executable file
·64 lines (57 loc) · 1.7 KB
/
ddev-install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/usr/bin/ash
apk add --no-cache bash sudo jq curl
adduser -D ddev -g "ddev" -s /bin/bash -D ddev -h /home/ddev
echo "ddev ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/ddev && chmod 0440 /etc/sudoers.d/ddev
unamearch=$(uname -m)
RED='\033[31m'
RESET='\033[0m'
# Get binary to be downloaded
case ${unamearch} in
x86_64) ARCH="amd64";
;;
aarch64) ARCH="arm64";
;;
arm64) ARCH="arm64"
;;
*) printf "${RED}Sorry, your machine architecture ${unamearch} is not currently supported.\n${RESET}" && exit 106
;;
esac
wget "https://github.com/ddev/ddev/releases/download/${DDEV_VERSION}/ddev_linux-${ARCH}.${DDEV_VERSION}.tar.gz"
# Prepare and install binaries
mkdir ddev
tar xfvz "ddev_linux-${ARCH}.${DDEV_VERSION}.tar.gz" --directory ddev
mv ddev/ddev /usr/local/bin/
mv ddev/mkcert /usr/local/bin/
sudo -i ddev /usr/local/bin/mkcert -install
rm -Rf ddev "ddev_linux-${ARCH}.${DDEV_VERSION}.tar.gz"
# Ensure required folders exist
mkdir -p /home/ddev/.ddev/commands/host
echo "
disable_http2: false
fail_on_hook_fail: false
instrumentation_opt_in: false
internet_detection_timeout_ms: 3000
last_started_version: ${DDEV_VERSION}
letsencrypt_email: ""
mkcert_caroot: /home/ddev/.local/share/mkcert
no_bind_mounts: false
omit_containers: []
performance_mode: none
project_tld: ddev.site
router: traefik
router_bind_all_interfaces: false
router_http_port: \"80\"
router_https_port: \"443\"
mailpit_http_port: \"8025\"
mailpit_https_port: \"8026\"
simple_formatting: false
table_style: default
traefik_monitor_port: \"10999\"
use_hardened_images: false
use_letsencrypt: false
wsl2_no_windows_hosts_mgt: false
web_environment: []
xdebug_ide_location: ""
" > /home/ddev/.ddev/global_config.yaml
mkdir /builds
chown -R ddev:ddev /home/ddev /builds