Skip to content
This repository has been archived by the owner on Oct 1, 2020. It is now read-only.

Commit

Permalink
match any server name in nginx
Browse files Browse the repository at this point in the history
  • Loading branch information
monty5811 committed Jul 13, 2017
1 parent 460f002 commit eb22a51
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
2 changes: 1 addition & 1 deletion ansible/env_vars/example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ le_email: ""
# Database settings
db_password: "this should be changed to a long random string"
# Nginx settings
nginx_server_name: "server_name_replace_me"
nginx_server_name: "_" # replace this with your domain name
# Application Settings
django_secret_key: 'this should be a very long string'
# this is used in the account related emails and should match your server settings
Expand Down
10 changes: 1 addition & 9 deletions scripts/ansible_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,6 @@ pull_repo() {
fi
}

replace_ip() {
echo "Detecting IP and writing to nginx config"
cd $ANSIBLE_DIR
IP=`curl ifconfig.co`
sed -i -e "s/server_name_replace_me/$IP/g" env_vars/example.yml
}

install() {
echo "Running ansible deploy"
$APOSTELLO_INSTALL_DIR/venv/bin/ansible-playbook -i 127.0.0.1, production.yml --connection=local
Expand All @@ -69,7 +62,7 @@ print_help() {
echo "## Twilio setup: http://goo.gl/2lt8dX ##"
echo "## ##"
echo "## Then run the command: ##"
echo "## ./$APOSTELLO_INSTALL_DIR/scripts/ansible_install.sh ##"
echo "## ./$APOSTELLO_INSTALL_DIR/scripts/ansible_install.sh ##"
echo "## ##"
echo "## More info: https://goo.gl/WWFj3h ##"
echo "## ##"
Expand All @@ -78,6 +71,5 @@ print_help() {

presetup
pull_repo
replace_ip
install
print_help

0 comments on commit eb22a51

Please sign in to comment.