Skip to content

Instantly share code, notes, and snippets.

@chriswhong
Created June 21, 2016 14:55
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save chriswhong/c7c8c0ef5e943ef2597dd74f5e6e19ce to your computer and use it in GitHub Desktop.
Save chriswhong/c7c8c0ef5e943ef2597dd74f5e6e19ce to your computer and use it in GitHub Desktop.
Steps to get docker-cartodb working with a real domain
#Notes for getting docker-cartodb to run on a digitalocean droplet
As of 21 June 2016, the Dockerfile at sverhoeven/docker-cartodb is not up to date, and the build will fail. It seems to fail at step 39, when it goes to create a user, but was not able to update it to get it working. Hopefully someone else can get it going with the latest cartodb code.
`https://hub.docker.com/r/sverhoeven/cartodb/`
However, running `docker run -d -p 3000:3000 -p 8080:8080 -p 8181:8181 sverhoeven/cartodb` will pull a complete docker image that is a few months old.
Running this image will get you a container that expects to run at the domain `cartodb.localhost`, and per the installation instructions you are told to update your hosts file to point cartodb.localhost to the IP of your docker host.
I wanted to run this with a real domain, so here are some notes on the steps involved.
- run the image using `docker run -d -p 3000:3000 -p 8080:8080 -p 8181:8181 sverhoeven/cartodb`
- ssh into the running container using `docker exec -it {containerid} /bin/bash
- update `config/app_config.yml` and replace every instance of `cartodb.local` with the domain name you plan to use
- diconnect from the container and COMMIT it `docker commit containerid sverhoeven/cartodb:latest`
- run the new image
- create and A record for your domain name and point it to the IP of your docker host
- on the docker host, add `config/cartodb.nginx.proxy.conf` (from the docker-cartodb repo) to `/etc/nginx/conf.d/`.
- (optional) if you want a different organization or user account, ssh in again and run the respective account creation scripts in `config/script`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment