diff --git a/basic-ruby/lxcfile b/basic-ruby/lxcfile index 82fe408..295b9e2 100644 --- a/basic-ruby/lxcfile +++ b/basic-ruby/lxcfile @@ -11,17 +11,12 @@ RUN EOF # Download and unpack Ruby mkdir -p /usr/src/ruby - wget http://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.6.tar.xz -O - | tar xJf - -C /usr/src/ruby --strip-components=1 - cd /usr/src/ruby - - # Hackfix to suppress "Insecure world writable dir" warning - sed -ni 'p;13a #define ENABLE_PATH_CHECK 0' file.c - - # Configure compilation + hackfix to detect isnan/isinf macros - autoconf - ac_cv_func_isnan=yes ac_cv_func_isinf=yes ./configure --build=x86_64-linux-musl --disable-install-doc --enable-shared + wget http://cache.ruby-lang.org/pub/ruby/2.4/ruby-2.4.5.tar.xz -O - | tar xJf - -C /usr/src/ruby --strip-components=1 # Compile and install Ruby + cd /usr/src/ruby + autoconf + ./configure --build=x86_64-linux-musl --disable-install-doc --enable-shared make -j $(getconf _NPROCESSORS_ONLN) make install @@ -31,8 +26,8 @@ RUN EOF gem update --system # Cleanup - cd /tmp - rm -r /usr/src/ruby apk --no-cache del .deps + cd /root + rm -r /usr/src/ruby rm -rf /root/.gem EOF diff --git a/crisiscleanup/install/createdb.sql b/crisiscleanup/install/createdb.sql index 2b8176a..5ee27da 100644 --- a/crisiscleanup/install/createdb.sql +++ b/crisiscleanup/install/createdb.sql @@ -4,3 +4,4 @@ REVOKE ALL ON DATABASE crisiscleanup FROM public; ALTER DATABASE crisiscleanup OWNER TO crisiscleanup; \c crisiscleanup CREATE EXTENSION hstore; +CREATE EXTENSION pg_stat_statements; diff --git a/crisiscleanup/lxcfile b/crisiscleanup/lxcfile index 2d41ea7..c84d2b2 100644 --- a/crisiscleanup/lxcfile +++ b/crisiscleanup/lxcfile @@ -17,14 +17,10 @@ RUN EOF apk --no-cache add --virtual .deps build-base git libxml2-dev libxslt-dev linux-headers npm postgresql-dev yarn zlib-dev # Clone CrisisCleanup - git clone --depth 1000 https://github.com/CrisisCleanup/crisiscleanup /srv/crisiscleanup - # TODO: Update ruby version - git -C /srv/crisiscleanup checkout b9035bd44fff371ea3d525eb560ff45504acaee7 + git clone --depth 1 https://github.com/CrisisCleanup/crisiscleanup /srv/crisiscleanup - # Hackfix ruby and nodejs dependency versions - sed -i 's/2\.2\.5/2.3.6/' /srv/crisiscleanup/Gemfile - sed -i 's/rdoc (4\.2\.0)/rdoc (4.3.0)/' /srv/crisiscleanup/Gemfile.lock - sed -i 's/8\.2\.0/>=8.2.0/' /srv/crisiscleanup/package.json + # Hackfix ruby dependency version + sed -i 's/2\.4\.4/2.4.5/' /srv/crisiscleanup/Gemfile # Install Ruby and NodeJS dependencies cd /srv/crisiscleanup