These scripts can be run with the following commands, by a super user. This installs a lot of stuff, read first.
You can add -s -- --dry-run
to then end to do a dry run first.
These are tested on an ec2 instance running vscode remote
- Set up vscode remote
- Run all these scripts
- Reboot instance
git clone ...
docker-compose up -d
should work now- Also PHP, node, git, ssh.
This installs PHP 8.1, extensions and composer. It should output composer's help.
curl -fsSL https://gist.githubusercontent.com/Shelob9/f981e8fee4e80aec383442df7838de7e/raw/427f097ae2b4c66e7ad013407ae8fe858bb849e6/php81.sh | sh
curl https://gist.githubusercontent.com/Shelob9/f981e8fee4e80aec383442df7838de7e/raw/c799942bca5ab2bc5f2167dfdd49e00278ab5f9c/nvm20.sh -fsSL | sh
curl -fsSL https://gist.githubusercontent.com/Shelob9/f981e8fee4e80aec383442df7838de7e/raw/b4359b698c6be584d259dac68ae348d4e6e9bf8a/docker.sh | sh
If you try and run docker-compose up
or whatever now, you will likely run into a Docker permissions error, code 13.
This will make the user ubuntu
a super user. That is the user that is running Docker.
curl -fsSL https://gist.githubusercontent.com/Shelob9/f981e8fee4e80aec383442df7838de7e/raw/b4359b698c6be584d259dac68ae348d4e6e9bf8a/fix-docker-permissions.sh | sh
Expected output: Adding user ubuntu to group docker
This sets up git and creates and SSH key pair. It outputs the public key
Make sure to change email@email.email to your email and to your name. Keep the double quotes around each.
curl -fsSL https://gist.githubusercontent.com/Shelob9/f981e8fee4e80aec383442df7838de7e/raw/b4359b698c6be584d259dac68ae348d4e6e9bf8a/git.sh | bash -s "<email@email.email>" "<name>"
Expected output is the ssh public key, copy that and then add a new ssh key on Github.