Skip to content

Commit

Permalink
last postinstall testing
Browse files Browse the repository at this point in the history
  • Loading branch information
v1nsai committed Dec 8, 2024
1 parent e85889b commit 3d70f7c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
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...\"\ncurl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh
| bash\nsource ~/.bashrc\nnvm install 18\nnvm use 18\n\n# If everything runs successfully,
| bash\ncat <<EOF >> /home/$USERNAME/.bashrc\nexport NVM_DIR=\"$HOME/.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\nsource
/home/$USERNAME/.bashrc\nnvm install 18\nnvm use 18\n\n# If everything runs successfully,
don't bother running next startup\ntouch /postinstall-has-run"
kind: ConfigMap
metadata:
Expand Down
7 changes: 6 additions & 1 deletion apps/services/devbox/files/postinstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,12 @@ sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plug

echo "Installing Node..."
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
source ~/.bashrc
cat <<EOF >> /home/$USERNAME/.bashrc
export NVM_DIR="$HOME/.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 3d70f7c

Please sign in to comment.