最新版
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
Stefan Verhoeven 685c0f1f80
Give user and organization geocoder quota
7 years ago
config Use -h to specify hostname + disabled hubspot + fix missing locales from upstream 8 years ago
Dockerfile Give user and organization geocoder quota 7 years ago
LICENSE Initial commit 10 years ago
README.md Added section how to persist data in README 7 years ago
cartodb_pgsql.sh Populate docker-cartodb with required files. 10 years ago
create_dev_user Able to fill internal geocoder tables, but get 'too many source rows' error during georeference analysis of countries. 8 years ago
fill_geocoder.sh Give user and organization geocoder quota 7 years ago
geocoder.sh Give user and organization geocoder quota 7 years ago
geocoder_server.sql Able to fill internal geocoder tables, but get 'too many source rows' error during georeference analysis of countries. 8 years ago
setup_fdw.sh Example how to use foreign data wrapper in CartoDB. 10 years ago
setup_organization.sh Able to fill internal geocoder tables, but get 'too many source rows' error during georeference analysis of countries. 8 years ago
startup.sh Use -h to specify hostname + disabled hubspot + fix missing locales from upstream 8 years ago
template_postgis.sh Further progress configuring geocoder. 8 years ago

README.md

docker-cartodb

This docker container provides a fully working cartodb development solution without the installation hassle.

Just run the commands and then connect to http://cartodb.localhost with your you browser.

The default login is dev/pass1234. You may want to change it when you'll run it for the outside.

It also creates an 'example' organization with owner login admin4example/pass1234. Organization members can be created on http://cartodb.localhost/user/admin4example/organization

How to build the container:

git clone https://github.com/sverhoeven/docker-cartodb.git
docker build -t=sverhoeven/cartodb docker-cartodb/

How to run the container:

docker run -d -p 80:80 -h cartodb.localhost sverhoeven/cartodb

The CartoDB instance has been configured with the hostname cartodb.localhost, this means the web browser and web server need to be able to resolve cartodb.localhost to an IP adress of the machine where the web server is running. This can be done by adding cartodb.localhost alias to your hosts file. For example

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 -h cartodb.example.com sverhoeven/cartodb

The chosen hostname should also resolve to an IP adress of the machine where the web server is running.

Persistent data

To persist the PostgreSQL data, the PostGreSQL data dir (/var/lib/postgresql) must be persisted outside the Cartodb Docker container.

The PostGreSQL data dir is filled during the building of this Docker image and must be copied to the local filesystem and then the container must be started with the local copy volume mounted.

docker create --name cartodb_pgdata sverhoeven/cartodb
# Change to directory to save the Postgresql data dir (cartodb_pgdata) of the CartoDB image
docker cp cartodb_pgdata:/var/lib/postgresql $PWD/cartodb_pgdata
docker rm -f cartodb_pgdata
# Inside container cartodb_pgdata is owned by postgres (uid=105) user,
# it should be owned by same user on the local filesystem
sudo chown -R 105.105 $PWD/cartodb_pgdata

After this the CartoDB container will have a database that stays filled after restarts. The CartoDB container can be started with

docker run -d -p 80:80 -h cartodb.example.com -v $PWD/cartodb_pgdata:/var/lib/postgresql sverhoeven/cartodb

Geocoder

The external geocoders like heremaps or mapzen have dummy api keys and do not work. No attempts haven been made or will be made in this Docker image to get the external geocoders to work.

The internal geocoder is configured, but contains no data inside the image.

To fill the internal geocoder run

docker exec -ti <carto docker container id> bash -c /cartodb/script/fill_geocoder.sh

This will run the scripts described at https://github.com/CartoDB/data-services/tree/master/geocoder It will use at least require 5.7+7.8Gb of diskspace to download the dumps and import them.