Allow different hostname to be set

This commit is contained in:
Stefan Verhoeven 2017-04-06 20:02:07 +02:00
parent 13387377c9
commit 76d9aab0f6
2 changed files with 13 additions and 0 deletions

View File

@ -36,3 +36,13 @@ This can be done by adding cartodb.localhost alias to your hosts file. For examp
sudo sh -c 'echo 127.0.1.1 cartodb.localhost >> /etc/hosts'
```
(For Windows it will be `C:\Windows\System32\drivers\etc\hosts`)
How to use a different hostname:
--------------------------------
For example to use `cartodb.example.com` as a hostname start with:
```
docker run -d -p 80:80 -e CARTO_HOST=cartodb.example.com sverhoeven/cartodb
```
The chosen hostname should also resolve to an IP adress of the machine where the web server is running.

View File

@ -1,5 +1,8 @@
#!/bin/bash
CARTO_HOST=${CARTO_HOST=cartodb.localhost}
perl -pi -e 's/cartodb\.localhost/$ENV{"CARTO_HOST"}/g' /etc/nginx/sites-enabled/default /cartodb/config/app_config.yml /Windshaft-cartodb/config/environments/development.js
service postgresql start
service redis-server start
/opt/varnish/sbin/varnishd -a :6081 -T localhost:6082 -s malloc,256m -f /etc/varnish.vcl