Skip to content

Commit

Permalink
postinstall
Browse files Browse the repository at this point in the history
  • Loading branch information
v1nsai committed Dec 8, 2024
1 parent c9b6dab commit 84b6338
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 4 additions & 1 deletion apps/services/devbox/app/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ data:
tee /etc/apt/sources.list.d/docker.list > /dev/null\nsudo apt-get update \nsudo
apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin
docker-compose-plugin\n\necho \"Installing Node...\"\nsu - $USERNAME -c \"curl
-o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash\"\n#
-o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash\"\ncat
<<EOF >> /home/$USERNAME/.bashrc\nexport NVM_DIR=\"/home/$USERNAME/.nvm\"\n[ -s
\"$NVM_DIR/nvm.sh\" ] && \\. \"$NVM_DIR/nvm.sh\" # This loads nvm\n[ -s \"$NVM_DIR/bash_completion\"
] && \\. \"$NVM_DIR/bash_completion\" # This loads nvm bash_completion\nEOF\n#
source /home/$USERNAME/.bashrc\n# nvm install 18\n# nvm use 18\n\n# If everything
runs successfully, don't bother running next startup\ntouch /postinstall-has-run"
kind: ConfigMap
Expand Down
5 changes: 5 additions & 0 deletions apps/services/devbox/files/postinstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plug

echo "Installing Node..."
su - $USERNAME -c "curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash"
cat <<EOF >> /home/$USERNAME/.bashrc
export NVM_DIR="/home/$USERNAME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
EOF
# source /home/$USERNAME/.bashrc
# nvm install 18
# nvm use 18
Expand Down

0 comments on commit 84b6338

Please sign in to comment.