-
Notifications
You must be signed in to change notification settings - Fork 10
/
Dockerfile.jruby
47 lines (39 loc) · 1.22 KB
/
Dockerfile.jruby
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
42
43
44
45
46
47
FROM jruby:9.4
LABEL maintainer="[email protected]"
# Prevent services from freaking out when loading "native protocols db"
RUN apt-get update \
&& apt-get install -y netbase git --no-install-recommends \
&& rm -rf /var/lib/apt/lists/*
ENV APP_ENTRYPOINT web.rb
ENV JRUBY_OPTIONS ''
ENV RACK_ENV production
ENV LOG_LEVEL info
ENV RUBY_DEBUG_PORT 9229
ENV RUBY_DEBUG_HOST 0.0.0.0
ENV RUBY_DEBUG_OPEN_FRONTEND chrome
ENV USE_LEGACY_UTILS 'true'
ENV PRINT_DEPRECATION_WARNINGS 'true'
ENV MU_SPARQL_ENDPOINT 'http://database:8890/sparql'
ENV MU_APPLICATION_GRAPH 'http://mu.semte.ch/application'
ENV TRUSTED_IP 0.0.0.0/0
EXPOSE 80
RUN mkdir -p /usr/src/app
ADD . /usr/src/app
WORKDIR /app
RUN ln -s /app /usr/src/app/ext \
&& ln -s /app/spec /usr/src/app/spec/ext \
&& mkdir /logs \
&& touch /logs/application.log \
&& ln -sf /dev/stdout /logs/application.log \
&& cd /usr/src/app \
&& bundle install
ONBUILD ADD . /app/
ONBUILD RUN if [ -f /app/on-build.sh ]; \
then \
echo "Running custom on-build.sh of child" \
&& chmod +x /app/on-build.sh \
&& /bin/bash /app/on-build.sh ;\
fi
ONBUILD RUN cd /usr/src/app \
&& bundle install
CMD ["/usr/src/app/mu-jruby-template.sh"]