From 9b79fb9735bccfe61ef3c5af014e032f99b113ab Mon Sep 17 00:00:00 2001 From: Sebastian Silva Date: Tue, 26 Oct 2021 17:35:28 -0500 Subject: [PATCH] Remove forego and start passenger directly (#1545) * Properly link to dockerfile * Remove forego and start passenger directly * Remove Procfile * Attempt to upgrade bundler * Run thru bundler --- Procfile | 2 -- docker-compose.yml | 2 +- dockerfiles/development | 5 ----- dockerfiles/production | 10 ++++------ start.sh | 2 +- 5 files changed, 6 insertions(+), 15 deletions(-) delete mode 100644 Procfile diff --git a/Procfile b/Procfile deleted file mode 100644 index b015561f..00000000 --- a/Procfile +++ /dev/null @@ -1,2 +0,0 @@ -passenger: passenger start --port $PORT -puma: puma -C config/puma.rb diff --git a/docker-compose.yml b/docker-compose.yml index 133b1b59..579dfeb6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,7 +10,7 @@ services: web: build: context: . - dockerfile: ${RAILS_ENV:-production} + dockerfile: ./dockerfiles/${RAILS_ENV:-production} ulimits: core: 0 command: [ "sh", "/app/start.sh" ] diff --git a/dockerfiles/development b/dockerfiles/development index aba39daa..ca4b37d0 100644 --- a/dockerfiles/development +++ b/dockerfiles/development @@ -37,11 +37,6 @@ COPY ./nolimit.xml /etc/ImageMagick-6/policy.xml RUN curl -sL https://deb.nodesource.com/setup_12.x | bash - && apt-get install -y npm RUN npm install -g yarn -# Installing ForeGo to schedule processes -RUN wget https://bin.equinox.io/c/ekMN3bCZFUn/forego-stable-linux-amd64.tgz && \ - tar xvf forego-stable-linux-amd64.tgz -C /usr/local/bin && \ - rm forego-stable-linux-amd64.tgz - # See https://github.com/instructure/canvas-lms/issues/1404#issuecomment-461023483 and # https://github.com/publiclab/mapknitter/pull/803 RUN git config --global url."https://".insteadOf git:// diff --git a/dockerfiles/production b/dockerfiles/production index a01eabba..94440ce4 100644 --- a/dockerfiles/production +++ b/dockerfiles/production @@ -24,11 +24,6 @@ COPY ./nolimit.xml /etc/ImageMagick-6/policy.xml RUN curl -sL https://deb.nodesource.com/setup_12.x | bash - && apt-get install -y npm RUN npm install -g yarn -# Installing ForeGo to schedule processes -RUN wget https://bin.equinox.io/c/ekMN3bCZFUn/forego-stable-linux-amd64.tgz && \ - tar xvf forego-stable-linux-amd64.tgz -C /usr/local/bin && \ - rm forego-stable-linux-amd64.tgz - # See https://github.com/instructure/canvas-lms/issues/1404#issuecomment-461023483 and # https://github.com/publiclab/mapknitter/pull/803 RUN git config --global url."https://".insteadOf git:// @@ -41,6 +36,9 @@ WORKDIR /app RUN apt-get clean && \ apt-get autoremove -y -RUN gem install bundler && bundle install +ENV BUNDLER_VERSION=2.1.4 +RUN gem install --default bundler && \ + gem update --system && \ + bundle install CMD [ "sh", "/app/start.sh" ] diff --git a/start.sh b/start.sh index a74b10d0..51cad4b8 100755 --- a/start.sh +++ b/start.sh @@ -36,4 +36,4 @@ if [ -f $pidfile ] ; then rm $pidfile; fi -forego start +bundle exec passenger start --port $PORT