diff --git a/README.md b/README.md index 589ab2b..c9bc3db 100644 --- a/README.md +++ b/README.md @@ -53,6 +53,11 @@ If you don't have a domain/subdomain pointing to your server yet, you can use th docker run -d -p 80:80 -h sverhoeven/cartodb ``` +Instead of setting hostname with `-h` you can also use the `CARTO_HOSTNAME` environment variable with: +``` +docker run -d -p 80:80 -e CARTO_HOSTNAME= cartodb.example.com sverhoeven/cartodb +``` + Persistent data --------------- diff --git a/startup.sh b/startup.sh index ce10c75..177f6b9 100755 --- a/startup.sh +++ b/startup.sh @@ -1,6 +1,8 @@ #!/bin/bash -perl -pi -e 's/cartodb\.localhost/$ENV{"HOSTNAME"}/g' /etc/nginx/sites-enabled/default /cartodb/config/app_config.yml /Windshaft-cartodb/config/environments/development.js +CARTO_HOSTNAME = ${CARTO_HOSTNAME:=$HOSTNAME} + +perl -pi -e 's/cartodb\.localhost/$ENV{"CARTO_HOSTNAME"}/g' /etc/nginx/sites-enabled/default /cartodb/config/app_config.yml /Windshaft-cartodb/config/environments/development.js service postgresql start service redis-server start