mirror of
https://github.com/publiclab/mapknitter.git
synced 2025-12-05 16:00:00 +01:00
* Properly link to dockerfile * Remove forego and start passenger directly * Remove Procfile * Attempt to upgrade bundler * Run thru bundler
45 lines
1.3 KiB
Plaintext
45 lines
1.3 KiB
Plaintext
# Dockerfile # Mapknitter
|
|
# https://github.com/publiclab/mapknitter/
|
|
# This image deploys Mapknitter!
|
|
|
|
FROM ruby:2.4.6-stretch
|
|
|
|
# Set correct environment variables.
|
|
ENV HOME /root
|
|
|
|
# Backported GDAL
|
|
RUN echo "deb [trusted=yes] http://packages.laboratoriopublico.org/publiclab/ stretch main" > /etc/apt/sources.list.d/publiclab.list
|
|
|
|
# We bring our own key to verify our packages
|
|
COPY sysadmin.publiclab.key /app/sysadmin.publiclab.key
|
|
RUN apt-key add /app/sysadmin.publiclab.key > /dev/null 2>&1
|
|
|
|
# Install dependencies for Mapknitter
|
|
RUN apt-get update -qq && apt-get install --allow-unauthenticated -y --no-install-recommends \
|
|
nodejs gdal-bin curl procps git imagemagick python-gdal zip
|
|
|
|
# Configure ImageMagick
|
|
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
|
|
|
|
# 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://
|
|
|
|
# Install bundle of gems
|
|
# Add the Rails app
|
|
COPY . /app/
|
|
WORKDIR /app
|
|
|
|
RUN apt-get clean && \
|
|
apt-get autoremove -y
|
|
|
|
ENV BUNDLER_VERSION=2.1.4
|
|
RUN gem install --default bundler && \
|
|
gem update --system && \
|
|
bundle install
|
|
|
|
CMD [ "sh", "/app/start.sh" ]
|