Last active
April 1, 2023 00:01
-
-
Save poseidon-j/a0eff94a1624b143fd95dd5142f24f46 to your computer and use it in GitHub Desktop.
opendax 1click installation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -x | |
COMPOSE_VERSION="1.29.2" | |
COMPOSE_URL="https://github.com/docker/compose/releases/download/$COMPOSE_VERSION/docker-compose-$(uname -s)-$(uname -m)" | |
# Opendax bootstrap script | |
install_core() { | |
sudo bash <<EOS | |
apt-get update | |
apt-get install -y -q git tmux gnupg2 dirmngr dbus htop curl libmariadbclient-dev-compat build-essential | |
EOS | |
} | |
log_rotation() { | |
sudo bash <<EOS | |
mkdir -p /etc/docker | |
echo ' | |
{ | |
"log-driver": "json-file", | |
"log-opts": { | |
"max-size": "10m", | |
"max-file": "10" | |
} | |
}' > /etc/docker/daemon.json | |
EOS | |
} | |
# Docker installation | |
install_docker() { | |
curl -fsSL https://get.docker.com/ | bash | |
sudo bash <<EOS | |
usermod -a -G docker app | |
curl -L "$COMPOSE_URL" -o /usr/local/bin/docker-compose | |
chmod +x /usr/local/bin/docker-compose | |
EOS | |
} | |
install_ruby() { | |
sudo -u app bash <<EOS | |
gpg --keyserver keyserver.ubuntu.com --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB | |
curl -sSL https://rvm.io/mpapis.asc | gpg2 --import - | |
curl -sSL https://rvm.io/pkuczynski.asc | gpg2 --import - | |
curl -sSL https://get.rvm.io | bash -s stable --rails | |
source /home/app/.rvm/scripts/rvm | |
rvm use | |
EOS | |
} | |
install_core | |
log_rotation | |
install_docker | |
install_ruby |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
N