-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
70 lines (65 loc) · 2.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
FROM phusion/passenger-ruby32
LABEL vendor="Fachschaft MathPhysInfo"
MAINTAINER Henrik Reinstädtler <henrik@mathphys.stura.uni-heidelberg.de>
#RUN apt-get update && \
# apt-get install -y gnupg2 dirmngr
#RUN gpg2 --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
# RUN curl -sSL https://rvm.io/mpapis.asc | gpg2 --import -
# RUN /pd_build/ruby-2.3.7.sh
# RUN /pd_build/redis.sh
# Enable the Redis service.
RUN rm -f /etc/service/redis/down && \
apt-get update && \
apt-get install -y \
build-essential libpq-dev wget git cron pdftk \
imagemagick libmagickwand-dev ghostscript texlive-latex-extra \
cups texlive-pstricks texlive-fonts-recommended texlive-luatex
ENV HOME /root
# Use baseimage-docker's init process.
CMD ["/bin/bash", "-c", "/sbin/my_init 2>&1 | tee /home/app/ozean/log/stdout.log"]
#update nodejs
RUN npm install -g n && \
npm cache clean -f && \
n 8
RUN PATH="$PATH" && \
npm install -g bower && \
npm install -g ember-cli
ENV INSTALL_PATH /home/app/ozean
ENV EMBER_INSTALL_PATH /home/app/ozean/frontend
#Ordner erstellen und wechseln
RUN mkdir -p $INSTALL_PATH
WORKDIR $INSTALL_PATH
#Gemfile kopieren
COPY --chown=app:app Gemfile Gemfile.lock ./
COPY --chown=app:app bin bin
#bundles installieren
RUN bin/bundle install
#und den rest kopieren
COPY --chown=app:app ./ ./
ENV RAILS_ENV production
ENV EMBER_ENV production
WORKDIR ${EMBER_INSTALL_PATH}
RUN npm install && \
bower install && \
ember build
WORKDIR ${INSTALL_PATH}
RUN bash gem install whenever && \
rm -rf /home/app/ozean/tmp/pids && \
bundle exec whenever --update-crontab && \
rm -f /etc/service/nginx/down
ADD webapp.conf /etc/nginx/sites-enabled/webapp.conf
ADD postgres-env.conf /etc/nginx/main.d/postgres-env.conf
# Queue classic für mails
RUN mkdir -p /etc/service/queue_classic
ADD queue_classic.sh /etc/service/queue_classic/run
# Enable ssh
RUN rm -f /etc/service/sshd/down
ADD id_root.pub /tmp/your_key.pub
RUN cat /tmp/your_key.pub >> /root/.ssh/authorized_keys && \
rm -f /tmp/your_key.pub \
# clean up
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# https://stackoverflow.com/questions/42928765/convertnot-authorized-aaaa-error-constitute-c-readimage-453
RUN sed -i 's/<policy domain="coder" rights="none" pattern="PDF" \/>/<policy domain="coder" rights="read" pattern="PDF" \/>/g' /etc/ImageMagick-6/policy.xml
ADD logo.png /home/app/ozean/logo.png