Skip to content

Commit

Permalink
Allow to use env var to set hostname
Browse files Browse the repository at this point in the history
  • Loading branch information
sverhoeven committed Jun 22, 2018
1 parent f098d95 commit be4dad7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <servers-external-ip-address> 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=<servers-external-ip-address> cartodb.example.com sverhoeven/cartodb
```

Persistent data
---------------

Expand Down
4 changes: 3 additions & 1 deletion startup.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit be4dad7

Please sign in to comment.