Skip to content

Commit 9a01bbd

Browse files
committed
A nicer solution
1 parent 5a93c1d commit 9a01bbd

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

main/nginx.conf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,5 @@ server {
4343
proxy_pass http://unix:/home/ifrc/django_app.sock;
4444
}
4545
}
46+
47+
# This environment is CHANGE_ME_BEFORE_START.

main/runserver.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ if [ "$API_FQDN"x = goadmin.ifrc.orgx ]; then
1414
else
1515
sed -i 's/\$NGINX_SERVER_NAME/'$API_FQDN'/g' /etc/nginx/sites-available/nginx.conf
1616
fi
17+
# Just a temporary test:
18+
if [ "$GO_ENVIRONMENT"x = productionx ]; then
19+
sed -i 's/CHANGE_ME_BEFORE_START/prod/' /etc/nginx/sites-available/nginx.conf
20+
else
21+
sed -i 's/CHANGE_ME_BEFORE_START/'$GO_ENVIRONMENT'/' /etc/nginx/sites-available/nginx.conf
22+
fi
1723

1824
# Prepare log files and start outputting logs to stdout
1925
touch $HOME/logs/gunicorn.log

0 commit comments

Comments
 (0)