-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
40 lines (29 loc) · 1.45 KB
/
Dockerfile
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
FROM ruby:2.7
RUN echo 'deb http://deb.debian.org/debian/ buster main\n\
deb http://security.debian.org/debian-security buster/updates main' > /etc/apt/sources.list
# Install Node.js (Consider updating Node.js version)
RUN apt-get -qq update && \
apt-get -qq -y install apt-transport-https ca-certificates curl gnupg && \
curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | gpg --dearmor | tee /usr/share/keyrings/nodesource.gpg && \
echo "deb [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_12.x buster main" > /etc/apt/sources.list.d/nodesource.list && \
apt-get -qq update && \
apt-get -qq install -y nodejs && \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Install Elm (Consider updating Elm version)
RUN cd /usr/local/bin && \
curl -L "https://github.com/lydell/elm-old-binaries/releases/download/main/0.17.1-linux-x64.tar.gz" | tar xz --strip-components=1
WORKDIR /app
COPY Gemfile Gemfile.lock .
RUN bundle install --jobs 3 --deployment --without development test
# Update Elm package management commands if needed
COPY elm-package.json .
RUN git clone -b 4.0.2 https://github.com/thebritican/elm-autocomplete vendor/assets/elm/elm-autocomplete
RUN elm package install --yes
COPY . /app
RUN ./bin/precompile-assets.sh
ENV RAILS_ENV production
ENV RAILS_SERVE_STATIC_FILES true
ENV RAILS_LOG_TO_STDOUT true
ENV PORT 80
EXPOSE $PORT
CMD bundle exec rails s -p $PORT -b '0.0.0.0'