forked from decidim/decidim
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile.design
38 lines (27 loc) · 1.03 KB
/
Dockerfile.design
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
FROM ruby:2.7.5
LABEL maintainer="[email protected]"
ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8
ENV RAILS_ENV production
ENV PORT 3000
ENV SECRET_KEY_BASE=no_need_for_such_secrecy
ENV RAILS_SERVE_STATIC_FILES=true
RUN apt-get install -y git imagemagick wget \
&& apt-get clean
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - \
&& apt-get install -y nodejs \
&& apt-get clean
RUN npm install -g [email protected]
RUN gem install bundler --version '>= 2.2.18'
WORKDIR /code
COPY . .
# These two lines below will remove the `require` in `decidim-dev.gemspec`, which seems to be
# causing issues in certain circumstances using bundler. They should not be needed at all, so
# it is worth removing them in the future and checking out they work.
RUN sed -i '/require/d' decidim-dev/decidim-dev.gemspec
RUN sed -i "s/Decidim::Dev.version/\"$(cat .decidim-version)\"/g" decidim-dev/decidim-dev.gemspec
WORKDIR /code/decidim_app-design
RUN bundle install
RUN bundle exec rails assets:precompile
ENTRYPOINT []
CMD bundle exec rails s -b 0.0.0.0 -p $PORT