- add a new user and configure groups
- enable and configure sudo
- enable some opinionated ssh security settings
- adding your ssh key to the droplet
- enable and configure ufw firewall
- set up zsh and oh-my-zsh
- install and configure nginx to serve a static folder and an upstream backend
- install nvm, node.js and a list of required npm packages
- install mongodb
Have fun !
This will clone the repository and its git dependencies
git clone https://github.com/wbkd/nginx-nvm-mongo.git git submodule init git submodule update
Take a look to the shell variables used in ./run.sh, you may need to adapt this script to your system's requirements.
At the end of the deployment process, you should be able to launch the created droplet from your DigitalOcean panel. You can log into the droplet via ssh using the user you specified in ./ansible/vars.yml.
Place your static files in the folder associated with the variable
nginx_root and run your application server on the port associated with the variable
echo "<h1> works </h1>" > ~/project/index.html
And then open your droplet IP in your browser.
If errors occur creating the droplet, then you should double-check if the installed packer version is greater than 0.8.
You should not upload folders containing symlinks or you will run into the following issue:
errored: Error uploading playbook_dir directory
./run.shis actually deleting all symlinks from the project folder.