Pin to working version of repos

This commit is contained in:
Stefan Verhoeven 2018-07-01 20:37:07 +02:00
parent 27155eca32
commit 342010e7bd

View File

@ -13,6 +13,21 @@ ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8 ENV LC_ALL en_US.UTF-8
#ENV CARTODB_VERSION=v4.11.152
ENV CARTODB_VERSION=v4.12.9
ENV SQLAPI_VERSION=master
ENV CRANKSHAFT_VERSION=master
ENV WINDSHAFT_VERSION=master
#ENV SQLAPI_VERSION=1.47.2
#ENV CRANKSHAFT_VERSION=0.8.1
#ENV WINDSHAFT_VERSION=5.4.0
ENV DATASERVICES_VERSION=master
ENV DATAERVICESAPI_VERSION=master
#ENV DATASERVICES_VERSION=0.0.2
#ENV DATAERVICESAPI_VERSION=0.30.5-server
ENV OBSERVATORY_VERSION=master
#ENV OBSERVATORY_VERSION=1.9.0
RUN useradd -m -d /home/cartodb -s /bin/bash cartodb && \ RUN useradd -m -d /home/cartodb -s /bin/bash cartodb && \
apt-get install -y -q \ apt-get install -y -q \
build-essential \ build-essential \
@ -125,7 +140,7 @@ RUN cd / && \
curl https://bootstrap.pypa.io/get-pip.py | python && \ curl https://bootstrap.pypa.io/get-pip.py | python && \
git clone https://github.com/CartoDB/crankshaft.git && \ git clone https://github.com/CartoDB/crankshaft.git && \
cd /crankshaft && \ cd /crankshaft && \
git checkout master && \ git checkout $CRANKSHAFT_VERSION && \
make install && \ make install && \
cd .. cd ..
@ -139,13 +154,14 @@ ADD ./cartodb_pgsql.sh /tmp/cartodb_pgsql.sh
# Install CartoDB API # Install CartoDB API
RUN git clone git://github.com/CartoDB/CartoDB-SQL-API.git && \ RUN git clone git://github.com/CartoDB/CartoDB-SQL-API.git && \
cd CartoDB-SQL-API && \ cd CartoDB-SQL-API && \
git checkout $SQLAPI_VERSION && \
npm install && \ npm install && \
rm -r /tmp/npm-* /root/.npm rm -r /tmp/npm-* /root/.npm
# Install Windshaft # Install Windshaft
RUN git clone git://github.com/CartoDB/Windshaft-cartodb.git && \ RUN git clone git://github.com/CartoDB/Windshaft-cartodb.git && \
cd Windshaft-cartodb && \ cd Windshaft-cartodb && \
git checkout master && \ git checkout $WINDSHAFT_VERSION && \
npm install -g yarn@0.27.5 && \ npm install -g yarn@0.27.5 && \
yarn install && \ yarn install && \
rm -r /tmp/npm-* /root/.npm && \ rm -r /tmp/npm-* /root/.npm && \
@ -154,7 +170,7 @@ RUN git clone git://github.com/CartoDB/Windshaft-cartodb.git && \
# Install CartoDB # Install CartoDB
RUN git clone --recursive git://github.com/CartoDB/cartodb.git && \ RUN git clone --recursive git://github.com/CartoDB/cartodb.git && \
cd cartodb && \ cd cartodb && \
git checkout master && \ git checkout $CARTODB_VERSION && \
# Install cartodb extension # Install cartodb extension
cd lib/sql && \ cd lib/sql && \
PGUSER=postgres make install && \ PGUSER=postgres make install && \
@ -168,14 +184,18 @@ RUN git clone --recursive git://github.com/CartoDB/cartodb.git && \
gem install bundler bundle compass archive-tar-minitar && \ gem install bundler bundle compass archive-tar-minitar && \
/bin/bash -l -c 'bundle install' && \ /bin/bash -l -c 'bundle install' && \
cp config/grunt_development.json ./config/grunt_true.json && \ cp config/grunt_development.json ./config/grunt_true.json && \
/bin/bash -l -c 'bundle exec grunt' && \ /bin/bash -l -c 'bundle exec grunt'
rm -rf .git /root/.cache/pip node_modules # && \
#rm -rf .git /root/.cache/pip node_modules
# Geocoder SQL client + server # Geocoder SQL client + server
RUN git clone https://github.com/CartoDB/data-services.git && \ RUN git clone https://github.com/CartoDB/data-services.git && \
cd /data-services/geocoder/extension && PGUSER=postgres make all install && cd / && \ cd /data-services/geocoder/extension && \
git checkout $DATASERVICES_VERSION && \
PGUSER=postgres make all install && cd / && \
git clone https://github.com/CartoDB/dataservices-api.git && \ git clone https://github.com/CartoDB/dataservices-api.git && \
cd /dataservices-api/server/extension && \ cd /dataservices-api/server/extension && \
git checkout $DATAERVICESAPI_VERSION && \
PGUSER=postgres make install && \ PGUSER=postgres make install && \
cd ../lib/python/cartodb_services && \ cd ../lib/python/cartodb_services && \
pip install -r requirements.txt && pip install . && \ pip install -r requirements.txt && pip install . && \
@ -184,6 +204,7 @@ RUN git clone https://github.com/CartoDB/data-services.git && \
# Observatory extension # Observatory extension
RUN cd / && git clone --recursive https://github.com/CartoDB/observatory-extension.git && \ RUN cd / && git clone --recursive https://github.com/CartoDB/observatory-extension.git && \
cd observatory-extension && \ cd observatory-extension && \
git checkout $OBSERVATORY_VERSION && \
PGUSER=postgres make deploy PGUSER=postgres make deploy
# Copy confs # Copy confs
@ -206,6 +227,7 @@ RUN mkdir -p /cartodb/log && touch /cartodb/log/users_modifications && \
/opt/varnish/sbin/varnishd -a :6081 -T localhost:6082 -s malloc,256m -f /etc/varnish.vcl && \ /opt/varnish/sbin/varnishd -a :6081 -T localhost:6082 -s malloc,256m -f /etc/varnish.vcl && \
perl -pi.bak -e 's/^bind 127.0.0.1 ::1$/bind 0.0.0.0/' /etc/redis/redis.conf && \ perl -pi.bak -e 's/^bind 127.0.0.1 ::1$/bind 0.0.0.0/' /etc/redis/redis.conf && \
service postgresql start && service redis-server start && \ service postgresql start && service redis-server start && \
perl -pi -e 's/0\.22\.0/0.22.2/' /cartodb/app/models/user/db_service.rb && \
bash -l -c "cd /cartodb && bash script/create_dev_user && \ bash -l -c "cd /cartodb && bash script/create_dev_user && \
bash script/setup_organization.sh && bash script/geocoder.sh" && \ bash script/setup_organization.sh && bash script/geocoder.sh" && \
service postgresql stop && service redis-server stop && \ service postgresql stop && service redis-server stop && \