forked from publiclab/mapknitter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
production
41 lines (30 loc) · 1.13 KB
/
production
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Dockerfile # Mapknitter
# https://github.com/publiclab/mapknitter/
# This image deploys Mapknitter!
FROM ruby:2.7.6
# Set correct environment variables.
ENV HOME /root
# 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 curl procps git imagemagick
# Configure ImageMagick
COPY ./nolimit.xml /etc/ImageMagick-6/policy.xml
RUN curl -sL https://deb.nodesource.com/setup_16.x | bash - && apt-get install -y nodejs
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.3.18
RUN gem install --default bundler && \
gem update --system && \
bundle install
CMD [ "sh", "/app/start.sh" ]