Skip to content

Commit

Permalink
Allow different hostname to be set
Browse files Browse the repository at this point in the history
  • Loading branch information
sverhoeven committed Apr 6, 2017
1 parent 1338737 commit 76d9aab
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
3 changes: 3 additions & 0 deletions startup.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 76d9aab

Please sign in to comment.