diff --git a/aos-alpine-homer-base-install.sh b/aos-alpine-homer-base-install.sh index 915e356..6a8ffcd 100755 --- a/aos-alpine-homer-base-install.sh +++ b/aos-alpine-homer-base-install.sh @@ -1,19 +1,15 @@ #!/bin/bash +pkg_path=http://aos-np-prod-1:aos-np-prod-1@git.eshift.org/AoS_Digital_Health_Platform/aos-homer-np-prod.git + ## Update Alpine to latest things and make good to work with docker. apk update;apk upgrade --update-cache --available apk add --no-cache bash -apk add docker-engine docker-compose docker-cli docker fuse-overlayfs -# These are likely needed for many things run by pip -apk add py-pip libffi-dev openssl-dev gcc libc-dev make - ## Core AoS things we want on this kind of lxc apk add sed attr dialog bash bash-completion grep apk add util-linux binutils findutils readline apk add lsof less nano curl glances - - apk add openssh rc-update add sshd rc-service sshd start @@ -23,5 +19,31 @@ apk add nodejs npm apk add xsel apk add yarn apk add git +yarn global add serve + + +adduser -D -g 'AoS Dashboard' homer +su -c "cd /home/homer; git clone $pkg_path " -s /bin/sh homer +su -c "ln -s /home/homer/aos-homer-np-prod /home/homer/aos-dashboard" -s /bin/sh homer +git clone $pkg_path + + +cat > /etc/crontabs/root << 'EOF' +# do daily/weekly/monthly maintenance +# min hour day month weekday command +*/15 * * * * run-parts /etc/periodic/15min +0 * * * * run-parts /etc/periodic/hourly +0 2 * * * run-parts /etc/periodic/daily +0 3 * * 6 run-parts /etc/periodic/weekly +0 5 1 * * run-parts /etc/periodic/monthly +@reboot su -c "cd /home/homer/aos-dashboard/homer && /usr/bin/npx serve --no-clipboard 2>&1 > /dev/null &" -s /bin/sh homer +EOF +chmod 600 /etc/crontabs/root + + + + + +