From bc71a1bf83e81ff32b6849a5e01541530d60a143 Mon Sep 17 00:00:00 2001 From: Stefan Verhoeven Date: Thu, 13 Apr 2017 21:14:05 +0200 Subject: [PATCH] Use -h to specify hostname + disabled hubspot + fix missing locales from upstream --- Dockerfile | 9 +++------ README.md | 4 ++-- config/app_config.yml | 4 ++-- startup.sh | 3 +-- 4 files changed, 8 insertions(+), 12 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0b6c77e..c81d851 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,12 +6,14 @@ MAINTAINER Stefan Verhoeven # Configuring locales ENV DEBIAN_FRONTEND noninteractive +RUN apt-get update && apt-get install -y -q apt-utils && apt-get install -y -q locales && dpkg-reconfigure locales && \ + locale-gen en_US.UTF-8 && \ + update-locale LANG=en_US.UTF-8 ENV LANG en_US.UTF-8 ENV LANGUAGE en_US:en ENV LC_ALL en_US.UTF-8 RUN useradd -m -d /home/cartodb -s /bin/bash cartodb && \ - apt-get update && \ apt-get install -y -q \ build-essential \ autoconf \ @@ -90,14 +92,9 @@ RUN useradd -m -d /home/cartodb -s /bin/bash cartodb && \ wget \ nginx-light \ net-tools \ - locales \ --no-install-recommends && \ rm -rf /var/lib/apt/lists/* -RUN dpkg-reconfigure locales && \ - locale-gen en_US.UTF-8 && \ - update-locale LANG=en_US.UTF-8 - RUN git config --global user.email you@example.com RUN git config --global user.name "Your Name" diff --git a/README.md b/README.md index 1a5f299..52025cd 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ How to run the container: ------------------------- ``` -docker run -d -p 80:80 sverhoeven/cartodb +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. @@ -42,7 +42,7 @@ 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 +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. diff --git a/config/app_config.yml b/config/app_config.yml index 90a41df..a5bd205 100644 --- a/config/app_config.yml +++ b/config/app_config.yml @@ -77,8 +77,8 @@ defaults: &defaults api_key: metrics: hubspot: - events_host: 'http://track.hubspot.com' - token: 'yourtoken' + events_host: '' + token: '' form_ids: newsletter: '' event_ids: diff --git a/startup.sh b/startup.sh index 08c17c2..19c5f62 100755 --- a/startup.sh +++ b/startup.sh @@ -1,7 +1,6 @@ #!/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 +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 service postgresql start service redis-server start