forked from nanonanomachine/radvent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
34 lines (26 loc) · 1.02 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
FROM ruby:3.1.1
LABEL maintainer="Haruyuki Iida"
RUN apt-get update \
&& apt-get install -y npm --no-install-recommends \
&& rm -rf /var/lib/apt/lists/*
RUN npm install -g yarn nodejs
RUN mkdir -p /usr/local
COPY lib/radvent/version.rb /tmp/
RUN ruby -I /tmp -r version.rb -e "puts Radvent::VERSION.version" > /tmp/version
RUN git clone https://github.com/haru/radvent.git -b `cat /tmp/version` /usr/local/radvent
RUN rm /tmp/version.rb /tmp/version
WORKDIR /usr/local/radvent
RUN gem install bundler
RUN bundle update --bundler
RUN bundle install --without test development
COPY docker/database.yml /usr/local/radvent/config/
RUN bundle exec rake radvent:generate_default_settings
RUN yarn install
RUN bundle exec rake assets:clean && bundle exec rake assets:precompile
COPY docker/run.sh /usr/local/bin/run.sh
RUN mkdir -p /var/radvent_data/uploads
RUN rm -f /usr/local/radvent/public/uploads
RUN ln -s /var/radvent_data/uploads /usr/local/radvent/public/uploads
ENV RAILS_ENV=production
EXPOSE 3000
CMD sh -x /usr/local/bin/run.sh