Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ before_install:
script:
# Build docker image
- cd 2.3/
- docker build -t maestrano/web-ruby:travis . > /dev/null 2>&1
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you plz explain why this isn't required any more?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cesar-tonnoir looks like this was removed so we can see the docker build logs, also the 2>&1 was masking the exit code 🤔- see 43f2e36

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes exactly. I removed it to be able to see the docker logs when debugging and decided to keep it.

  • > /dev/null redirects stdout to `/dev/null/
  • 2>&1 redirects stderr to where we're redirecting stdout

- docker build -t maestrano/web-ruby:travis .

#=======================================
# Test with minimal parameters
Expand Down
33 changes: 7 additions & 26 deletions 2.3/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
FROM ruby:2.3-jessie
FROM ruby:2.3-stretch

ENV MYSQL_APT_VERSION 0.8.9-1
ENV DEBIAN_FRONTEND noninteractive

# Install System libraries
Expand All @@ -12,16 +11,7 @@ RUN apt-get update \
nginx \
supervisor \
awscli \
lsb-release \
debconf-utils

# Use official MySQL repository
RUN wget http://dev.mysql.com/get/mysql-apt-config_${MYSQL_APT_VERSION}_all.deb
RUN echo "mysql-apt-config mysql-apt-config/select-tools select Enabled" | debconf-set-selections
RUN dpkg -i mysql-apt-config_${MYSQL_APT_VERSION}_all.deb \
&& rm -f mysql-apt-config_${MYSQL_APT_VERSION}_all.deb \
&& apt-get update \
&& apt-get install -y libmysqlclient-dev \
python3-dev \
&& rm -rf /var/lib/apt/lists/*

# gpg keys listed at https://github.com/nodejs/node#release-team
Expand All @@ -36,13 +26,14 @@ RUN set -ex \
C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8 \
56730D5401028683275BD23C23EFEFE93C4CFFFE \
; do \
gpg --keyserver pool.sks-keyservers.net --recv-keys "$key" || \
gpg --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys "$key" || \
gpg --keyserver hkp://pgp.mit.edu:80 --recv-keys "$key" || \
gpg --keyserver hkp://keyserver.pgp.com:80 --recv-keys "$key" ; \
done

ENV NPM_CONFIG_LOGLEVEL info
ENV NODE_VERSION 6.12.0
ENV NODE_VERSION 6.14.4

RUN curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.xz" \
&& curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \
Expand Down Expand Up @@ -91,20 +82,10 @@ RUN gem install foreman \
uglifier:2.1.1 \
uglifier:3.0.2 \
will_paginate:3.0.4 \
--no-ri --no-rdoc --verbose

# Install python 3.5.5 as a stand alone library
RUN curl https://www.python.org/ftp/python/3.5.5/Python-3.5.5.tgz | tar xzf - -C /tmp
RUN cd /tmp/Python-3.5.5 \
&& ./configure --prefix=/opt/python \
&& make \
&& make install

# Add python3.5 to PATH
ENV PATH="${PATH}:/opt/python/bin"
--no-document --verbose

# Upgrade pip and wheel
RUN pip3 install pip==10.0.1 wheel==0.31.1
# Install pip3
RUN wget https://bootstrap.pypa.io/get-pip.py && python3 get-pip.py

# App Support tools
RUN mkdir -p /app_support/geocoder \
Expand Down
2 changes: 2 additions & 0 deletions 2.3/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ elif [ -n "$S3_URI" ]; then
if [ -z "$S3_SECRET_ACCESS_KEY" ]; then
opts="--no-sign-request"
fi
# Setting Signature Version 4 for S3 Request Authentication
aws configure set s3.signature_version s3v4
AWS_ACCESS_KEY_ID=$S3_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY=$S3_SECRET_ACCESS_KEY AWS_DEFAULT_REGION=$S3_REGION aws s3 cp $opts $S3_URI ./
archive_file=${S3_URI##*/}
echo "Unzipping $archive_file"
Expand Down