forked from nanonanomachine/radvent
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
34 lines (26 loc) · 1012 Bytes
/
Dockerfile
File metadata and controls
34 lines (26 loc) · 1012 Bytes
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:4.0
LABEL maintainer="Haruyuki Iida"
RUN apt-get update \
&& apt-get install -y curl --no-install-recommends \
&& curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - \
&& apt-get install -y nodejs --no-install-recommends \
&& rm -rf /var/lib/apt/lists/*
RUN npm install -g yarn
RUN mkdir -p /usr/local
COPY . /usr/local/radvent/
WORKDIR /usr/local/radvent
RUN bundle config set --local without 'test development'
RUN bundle install
COPY docker/database.yml /usr/local/radvent/config/
RUN bundle exec rake radvent:generate_default_settings
RUN yarn install
RUN mkdir -p app/assets/builds
RUN SECRET_KEY_BASE=dummy RAILS_ENV=production bundle exec rake assets:clean 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
ENV RAILS_SERVE_STATIC_FILES=true
EXPOSE 3000
CMD sh -x /usr/local/bin/run.sh