diff --git a/.ruby-version b/.ruby-version
index 6a6a3d8e3..ec1cf33c3 100644
--- a/.ruby-version
+++ b/.ruby-version
@@ -1 +1 @@
-2.6.1
+2.6.3
diff --git a/.travis.yml b/.travis.yml
index 9adfdf002..9a5516009 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -6,7 +6,7 @@ cache:
- node_modules
- $HOME/.nvm
rvm:
- - 2.6.1
+ - 2.6.3
addons:
postgresql: '9.6'
chrome: stable
diff --git a/Dockerfile b/Dockerfile
index 20c8fc779..a258d6542 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,9 +1,9 @@
#####################################################
#
-# Alpine container with
+# Alpine container with
# (this is used in DEV mode)
-#
-# + ruby:2.6.1
+#
+# + ruby:2.6.3
# + node:8.15.0
# + yarn:1.12.3
#
@@ -13,123 +13,119 @@ FROM node:8.15.1-alpine AS alpine-ruby-node
#------------------------------------------------------------------------------------------
#
# Ruby installation, taken from the official ruby alpine dockerfile
-# see : https://github.com/docker-library/ruby/blob/96fc06fb331a20ba823ecc11563a99d1eb94203f/2.6/alpine3.9/Dockerfile
+# see : https://github.com/docker-library/ruby/blob/9ae0943fa2935b3a13c72ae7d6afa2439145d7fa/2.6/alpine3.9/Dockerfile
#
#------------------------------------------------------------------------------------------
RUN apk add --no-cache \
- gmp-dev
+ gmp-dev
# skip installing gem documentation
RUN mkdir -p /usr/local/etc \
- && { \
- echo 'install: --no-document'; \
- echo 'update: --no-document'; \
- } >> /usr/local/etc/gemrc
+ && { \
+ echo 'install: --no-document'; \
+ echo 'update: --no-document'; \
+ } >> /usr/local/etc/gemrc
ENV RUBY_MAJOR 2.6
-ENV RUBY_VERSION 2.6.1
-ENV RUBY_DOWNLOAD_SHA256 47b629808e9fd44ce1f760cdf3ed14875fc9b19d4f334e82e2cf25cb2898f2f2
-ENV RUBYGEMS_VERSION 3.0.3
+ENV RUBY_VERSION 2.6.3
+ENV RUBY_DOWNLOAD_SHA256 11a83f85c03d3f0fc9b8a9b6cad1b2674f26c5aaa43ba858d4b0fcc2b54171e1
# some of ruby's build scripts are written in ruby
# we purge system ruby later to make sure our final image uses what we just built
# readline-dev vs libedit-dev: https://bugs.ruby-lang.org/issues/11869 and https://github.com/docker-library/ruby/issues/75
RUN set -ex \
- \
- && apk add --no-cache --virtual .ruby-builddeps \
- autoconf \
- bison \
- bzip2 \
- bzip2-dev \
- ca-certificates \
- coreutils \
- dpkg-dev dpkg \
- gcc \
- gdbm-dev \
- glib-dev \
- libc-dev \
- libffi-dev \
- libxml2-dev \
- libxslt-dev \
- linux-headers \
- make \
- ncurses-dev \
- openssl \
- openssl-dev \
- procps \
- readline-dev \
- ruby \
- tar \
- xz \
- yaml-dev \
- zlib-dev \
- \
- && wget -O ruby.tar.xz "https://cache.ruby-lang.org/pub/ruby/${RUBY_MAJOR%-rc}/ruby-$RUBY_VERSION.tar.xz" \
- && echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.xz" | sha256sum -c - \
- \
- && mkdir -p /usr/src/ruby \
- && tar -xJf ruby.tar.xz -C /usr/src/ruby --strip-components=1 \
- && rm ruby.tar.xz \
- \
- && cd /usr/src/ruby \
- \
-# https://github.com/docker-library/ruby/issues/196
-# https://bugs.ruby-lang.org/issues/14387#note-13 (patch source)
-# https://bugs.ruby-lang.org/issues/14387#note-16 ("Therefore ncopa's patch looks good for me in general." -- only breaks glibc which doesn't matter here)
- && wget -O 'thread-stack-fix.patch' 'https://bugs.ruby-lang.org/attachments/download/7081/0001-thread_pthread.c-make-get_main_stack-portable-on-lin.patch' \
- && echo '3ab628a51d92fdf0d2b5835e93564857aea73e0c1de00313864a94a6255cb645 *thread-stack-fix.patch' | sha256sum -c - \
- && patch -p1 -i thread-stack-fix.patch \
- && rm thread-stack-fix.patch \
- \
-# hack in "ENABLE_PATH_CHECK" disabling to suppress:
-# warning: Insecure world writable dir
- && { \
- echo '#define ENABLE_PATH_CHECK 0'; \
- echo; \
- cat file.c; \
- } > file.c.new \
- && mv file.c.new file.c \
- \
- && autoconf \
- && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
-# the configure script does not detect isnan/isinf as macros
- && export ac_cv_func_isnan=yes ac_cv_func_isinf=yes \
- && ./configure \
- --build="$gnuArch" \
- --disable-install-doc \
- --enable-shared \
- && make -j "$(nproc)" \
- && make install \
- \
- && runDeps="$( \
- scanelf --needed --nobanner --format '%n#p' --recursive /usr/local \
- | tr ',' '\n' \
- | sort -u \
- | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
- )" \
- && apk add --no-network --virtual .ruby-rundeps $runDeps \
- bzip2 \
- ca-certificates \
- libffi-dev \
- procps \
- yaml-dev \
- zlib-dev \
- && apk del --no-network .ruby-builddeps \
- && cd / \
- && rm -r /usr/src/ruby \
-# make sure bundled "rubygems" is older than RUBYGEMS_VERSION (https://github.com/docker-library/ruby/issues/246)
- && ruby -e 'exit(Gem::Version.create(ENV["RUBYGEMS_VERSION"]) > Gem::Version.create(Gem::VERSION))' \
- && gem update --system "$RUBYGEMS_VERSION" && rm -r /root/.gem/ \
-# rough smoke test
- && ruby --version && gem --version && bundle --version
+ \
+ && apk add --no-cache --virtual .ruby-builddeps \
+ autoconf \
+ bison \
+ bzip2 \
+ bzip2-dev \
+ ca-certificates \
+ coreutils \
+ dpkg-dev dpkg \
+ gcc \
+ gdbm-dev \
+ glib-dev \
+ libc-dev \
+ libffi-dev \
+ libxml2-dev \
+ libxslt-dev \
+ linux-headers \
+ make \
+ ncurses-dev \
+ openssl \
+ openssl-dev \
+ procps \
+ readline-dev \
+ ruby \
+ tar \
+ xz \
+ yaml-dev \
+ zlib-dev \
+ \
+ && wget -O ruby.tar.xz "https://cache.ruby-lang.org/pub/ruby/${RUBY_MAJOR%-rc}/ruby-$RUBY_VERSION.tar.xz" \
+ && echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.xz" | sha256sum -c - \
+ \
+ && mkdir -p /usr/src/ruby \
+ && tar -xJf ruby.tar.xz -C /usr/src/ruby --strip-components=1 \
+ && rm ruby.tar.xz \
+ \
+ && cd /usr/src/ruby \
+ \
+ # https://github.com/docker-library/ruby/issues/196
+ # https://bugs.ruby-lang.org/issues/14387#note-13 (patch source)
+ # https://bugs.ruby-lang.org/issues/14387#note-16 ("Therefore ncopa's patch looks good for me in general." -- only breaks glibc which doesn't matter here)
+ && wget -O 'thread-stack-fix.patch' 'https://bugs.ruby-lang.org/attachments/download/7081/0001-thread_pthread.c-make-get_main_stack-portable-on-lin.patch' \
+ && echo '3ab628a51d92fdf0d2b5835e93564857aea73e0c1de00313864a94a6255cb645 *thread-stack-fix.patch' | sha256sum -c - \
+ && patch -p1 -i thread-stack-fix.patch \
+ && rm thread-stack-fix.patch \
+ \
+ # hack in "ENABLE_PATH_CHECK" disabling to suppress:
+ # warning: Insecure world writable dir
+ && { \
+ echo '#define ENABLE_PATH_CHECK 0'; \
+ echo; \
+ cat file.c; \
+ } > file.c.new \
+ && mv file.c.new file.c \
+ \
+ && autoconf \
+ && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
+ # the configure script does not detect isnan/isinf as macros
+ && export ac_cv_func_isnan=yes ac_cv_func_isinf=yes \
+ && ./configure \
+ --build="$gnuArch" \
+ --disable-install-doc \
+ --enable-shared \
+ && make -j "$(nproc)" \
+ && make install \
+ \
+ && runDeps="$( \
+ scanelf --needed --nobanner --format '%n#p' --recursive /usr/local \
+ | tr ',' '\n' \
+ | sort -u \
+ | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
+ )" \
+ && apk add --no-network --virtual .ruby-rundeps $runDeps \
+ bzip2 \
+ ca-certificates \
+ libffi-dev \
+ procps \
+ yaml-dev \
+ zlib-dev \
+ && apk del --no-network .ruby-builddeps \
+ && cd / \
+ && rm -r /usr/src/ruby \
+ # rough smoke test
+ && ruby --version && gem --version && bundle --version
# install things globally, for great justice
# and don't create ".bundle" in all our apps
ENV GEM_HOME /usr/local/bundle
ENV BUNDLE_PATH="$GEM_HOME" \
- BUNDLE_SILENCE_ROOT_WARNING=1 \
- BUNDLE_APP_CONFIG="$GEM_HOME"
+ BUNDLE_SILENCE_ROOT_WARNING=1 \
+ BUNDLE_APP_CONFIG="$GEM_HOME"
# path recommendation: https://github.com/bundler/bundler/pull/6469#issuecomment-383235438
ENV PATH $GEM_HOME/bin:$BUNDLE_PATH/gems/bin:$PATH
# adjust permissions of a few directories for running "gem install" as an arbitrary user
@@ -163,7 +159,7 @@ ENV RAILS_ENV development
#
# This allow us to modify the docker
# entrypoint / run file without recompiling
-# the entire application
+# the entire application
# (especially when creating this buidl script =| )
#
# (@TODO - improve and review ignore to blacklist unneded items)
@@ -212,11 +208,11 @@ COPY Dockerfile [(docker-)]* /usr/src/app/
# Execution environment variables
#
-# timeout extension requried to ensure
+# timeout extension requried to ensure
# system work properly on first time load
-ENV RACK_TIMEOUT_WAIT_TIMEOUT=10000 \
- RACK_TIMEOUT_SERVICE_TIMEOUT=10000 \
- STATEMENT_TIMEOUT=10000
+ENV RACK_TIMEOUT_WAIT_TIMEOUT=10000 \
+ RACK_TIMEOUT_SERVICE_TIMEOUT=10000 \
+ STATEMENT_TIMEOUT=10000
# Run mode configuration between dev / demo
# for entrypoint script behaviour
@@ -226,7 +222,7 @@ ENV RUN_MODE="demo"
ENV DATABASE_URL="postgresql://devto:devto@db:5432/PracticalDeveloper_development"
# DB setup / migrate script triggers on boot
-ENV DB_SETUP="true" \
+ENV DB_SETUP="true" \
DB_MIGRATE="true"
#
diff --git a/Gemfile b/Gemfile
index 52d9bb58c..5a3591a4b 100644
--- a/Gemfile
+++ b/Gemfile
@@ -1,5 +1,5 @@
source "https://rubygems.org"
-ruby "2.6.1"
+ruby "2.6.3"
# Enforce git to transmitted via https.
# workaround until bundler 2.0 is released.
diff --git a/Gemfile.lock b/Gemfile.lock
index bbf60931c..549f593c8 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -950,7 +950,7 @@ DEPENDENCIES
zonebie (~> 0.6.1)
RUBY VERSION
- ruby 2.6.1p33
+ ruby 2.6.3p62
BUNDLED WITH
1.17.3
diff --git a/README.md b/README.md
index 269e06a3c..b1b0b5089 100644
--- a/README.md
+++ b/README.md
@@ -11,7 +11,7 @@
-
+
diff --git a/db/seeds.rb b/db/seeds.rb
index 04f96dfe4..e4c97c68d 100644
--- a/db/seeds.rb
+++ b/db/seeds.rb
@@ -2,7 +2,7 @@ Rails.logger.info "1. Creating Organizations"
3.times do
Organization.create!(
- name: Faker::SiliconValley.company,
+ name: Faker::TvShows::SiliconValley.company,
summary: Faker::Company.bs,
remote_profile_image_url: logo = Faker::Company.logo,
nav_image: logo,
diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh
index 5328f014a..fc09646f0 100755
--- a/docker-entrypoint.sh
+++ b/docker-entrypoint.sh
@@ -22,7 +22,7 @@ then
echo ">---"
echo "> [dev.to/docker-entrypoint.sh] DEV mode"
echo "> "
- echo "> Welcome to the dev.to, DEVELOPMENT container, for convinence your repository"
+ echo "> Welcome to the dev.to, DEVELOPMENT container, for convenience your repository"
echo "> should be mounted onto '/usr/src/app/', and port 3000 should be forwarded to your host machine"
echo "> "
echo "> In addition the following alias commands has been preconfigured to get you up and running quickly"
@@ -49,7 +49,7 @@ echo "> Time to rock & roll"
echo ">---"
#
-# DB setup
+# DB setup
# note this will fail (intentionally), if DB was previously setup
#
if [[ "$DB_SETUP" == "true" ]]
diff --git a/docker-run.sh b/docker-run.sh
index 7a424de30..8efcc62ab 100755
--- a/docker-run.sh
+++ b/docker-run.sh
@@ -22,7 +22,7 @@ then
echo "| For this container to work, we will need at minimum ALGOLIA API keys"
echo "| For logins to work, we will need either GITHUB or TWITTER API keys"
echo "|"
- echo "| See ( https://docs.dev.to/get-api-keys-dev-env/ ) "
+ echo "| See ( https://docs.dev.to/getting-started/config-env/ ) "
echo "| for instructions on how to get the various API keys "
echo "|"
echo "| Once you got your various API keys, please proceed to the next step"
@@ -114,7 +114,7 @@ fi
###########################################
#
-# Script header guide
+# Script header guide
#
###########################################
@@ -140,12 +140,12 @@ echo "#"
echo "# RUN_MODE can either be the following"
echo "#"
echo "# - 'DEV' : Start up the container into bash, with a quick start guide"
-echo "# - 'DEMO' : Start up the container, and run dev.to (requries ALGOLIA environment variables)"
+echo "# - 'DEMO' : Start up the container, and run dev.to (requires ALGOLIA environment variables)"
echo "# - 'RESET-DEV' : Resets postgresql and upload data directory for a clean deployment, before running as DEV mode"
echo "# - 'RESET-DEMO' : Resets postgresql and upload data directory for a clean deployment, before running as DEMO mode"
echo "# - 'INTERACTIVE-DEMO' : Runs this script in 'interactive' mode to setup the 'DEMO'"
echo "#"
-echo "# So for example to run a development container in bash its simply"
+echo "# So for example to run a development container in bash it's simply"
echo "# './docker-run.sh DEV'"
echo "#"
echo "# To run a simple demo, with some dummy data (replace > with the actual keys)"
@@ -439,7 +439,7 @@ mkdir -p "$UPLOAD_DIR"
#
# in DEV mode - lets run in interactive mode
#
-if [ "$RUN_MODE" = "DEV" ]
+if [ "$RUN_MODE" = "DEV" ]
then
docker run -it -p 3000:3000 \
--name dev-to-app \
@@ -472,7 +472,7 @@ dev-to:demo
# this waits up to ~20*30 seconds
#
echo "#---"
-echo "# Waiting for dev.to server... "
+echo "# Waiting for dev.to server... "
echo "#"
echo "# this commonly takes 2 ~ 10 minutes, basically, a very long time .... =[ "
@@ -506,7 +506,7 @@ echo "$DOCKER_INFO" | grep dev-to-
# Finishing message
#
echo "#---"
-echo "# Container deployed on port ( http://localhost:3000 )"
+echo "# Container deployed on address ( http://localhost:3000 )"
echo "# "
echo "# Time to dev.to(gether)"
echo "#---"
diff --git a/docs/installation/docker.md b/docs/installation/docker.md
index 20059a4e3..cc1c6e6ad 100644
--- a/docs/installation/docker.md
+++ b/docs/installation/docker.md
@@ -1,10 +1,49 @@
-# Docker Installation [Beta]
+# Installing DEV with Docker [Beta]
+
+## Installing prerequites
+
+_These prerequisites assume you're working on an operating system supported by Docker._
+
+### Docker and Docker Compose
+
+Docker is available for many different operating systems. We recommend you follow the [Docker CE install guide](https://docs.docker.com/install/) which illustrates multiple installation options for each OS.
+
+You're also going to need Docker Compose, to start multiple containers. We recommend you follow the [Docker Compose install guide](https://docs.docker.com/compose/install/) as well.
+
+## Installing DEV
+
+1. Fork DEV's repository, eg.