Skip to content

Instantly share code, notes, and snippets.

@LionZXY
Last active March 31, 2018 04:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LionZXY/4ec6044e4f14e7506952778c0772ac61 to your computer and use it in GitHub Desktop.
Save LionZXY/4ec6044e4f14e7506952778c0772ac61 to your computer and use it in GitHub Desktop.
init_config:
instances:
- proc_name: goodload
server {
location / {
proxy_pass http://localhost:8000;
}
location /status {
stub_status;
}
}
mkdir goodload
cd goodload/
apt-get update
DD_API_KEY=5994c110cf2e0e749d0d4de79e47f99e bash -c "$(curl -L https://raw.githubusercontent.com/DataDog/datadog-agent/master/cmd/agent/install_script.sh)"
apt-get install -y unzip python3-pip screen
wget http://my-files.ru/Save/oz4gml/goodload.zip
unzip goodload.zip
rm goodload.zip
pip3 install --upgrade pip
pip3 install django gunicorn
curl "https://gist.githubusercontent.com/LionZXY/4ec6044e4f14e7506952778c0772ac61/raw/c6ee23847d8f1e26efea961297f738120945d002/conf.yaml" >> /etc/datadog-agent/conf.d/gunicorn.d/conf.yaml
service datadog-agent restart
echo 'LC_ALL="en_US.UTF-8"' >> /etc/environment
reboot
# Добавить в Allowed Host IP
gunicorn --statsd-host=localhost:8125 -w 3 --bind 167.99.192.38:8000 --name goodload goodload.wsgi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment