-
-
Save roscopecoltran/fb0c145fefbba1586109b7c2604aca99 to your computer and use it in GitHub Desktop.
Install Go and Dgraph on AWS ubuntu AMI and run as service
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 | |
# install dgraph | |
sudo apt-get update -y | |
sudo apt-get install -y gcc | |
curl https://get.dgraph.io -sSf | bash | |
# create dgraph.service | |
sudo bash -c 'cat << EOF > /etc/systemd/system/dgraph.service | |
[Unit] | |
Description=dgraph | |
[Service] | |
ExecStart=/usr/local/bin/dgraph -w /home/ubuntu/dgraph/w -p /home/ubuntu/dgraph/p -bindall | |
Restart=always | |
User=ubuntu | |
[Install] | |
WantedBy=multi-user.target | |
EOF' | |
# enable and start dgraph service | |
sudo systemctl enable dgraph.service | |
sudo systemctl start dgraph.service |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment