|
@@ -1,8 +1,10 @@
|
|
FROM cloudron/base:0.9.0
|
|
FROM cloudron/base:0.9.0
|
|
MAINTAINER Johannes Zellner <johannes@cloudron.io>
|
|
MAINTAINER Johannes Zellner <johannes@cloudron.io>
|
|
|
|
|
|
-RUN mkdir -p /app/data /app/code /run/app/sessions
|
|
|
|
-WORKDIR /app/data
|
|
|
|
|
|
+RUN mkdir -p /app/code /run/app/sessions
|
|
|
|
+WORKDIR /app/code
|
|
|
|
+
|
|
|
|
+RUN apt-get update && apt-get install -y php libapache2-mod-php php-redis php-zip crudini && rm -r /var/cache/apt /var/lib/apt/lists
|
|
|
|
|
|
# configure apache
|
|
# configure apache
|
|
RUN rm /etc/apache2/sites-enabled/*
|
|
RUN rm /etc/apache2/sites-enabled/*
|
|
@@ -12,17 +14,20 @@ RUN sed -e "s,MaxSpareServers[^:].*,MaxSpareServers 5," -i /etc/apache2/mods-ava
|
|
RUN a2disconf other-vhosts-access-log
|
|
RUN a2disconf other-vhosts-access-log
|
|
RUN echo "Listen 8000" > /etc/apache2/ports.conf
|
|
RUN echo "Listen 8000" > /etc/apache2/ports.conf
|
|
|
|
|
|
-# configure mod_php
|
|
|
|
-RUN a2enmod php5 rewrite dav dav_fs authnz_ldap
|
|
|
|
-RUN sed -e 's/upload_max_filesize = .*/upload_max_filesize = 8M/' \
|
|
|
|
- -e 's,;session.save_path.*,session.save_path = "/run/app/sessions",' \
|
|
|
|
- -i /etc/php5/apache2/php.ini
|
|
|
|
-
|
|
|
|
RUN ln -sf /app/data/apache2-app.conf /etc/apache2/sites-available/app.conf
|
|
RUN ln -sf /app/data/apache2-app.conf /etc/apache2/sites-available/app.conf
|
|
RUN ln -sf /etc/apache2/sites-available/app.conf /etc/apache2/sites-enabled/app.conf
|
|
RUN ln -sf /etc/apache2/sites-available/app.conf /etc/apache2/sites-enabled/app.conf
|
|
|
|
|
|
|
|
+# configure mod_php
|
|
|
|
+RUN crudini --set /etc/php/7.0/apache2/php.ini PHP upload_max_filesize 8M && \
|
|
|
|
+ crudini --set /etc/php/7.0/apache2/php.ini PHP post_max_size 8M && \
|
|
|
|
+ crudini --set /etc/php/7.0/apache2/php.ini PHP memory_limit 64M && \
|
|
|
|
+ crudini --set /etc/php/7.0/apache2/php.ini Session session.save_path /run/app/sessions
|
|
|
|
+
|
|
ADD apache2-app.conf /app/code/apache2-app.conf
|
|
ADD apache2-app.conf /app/code/apache2-app.conf
|
|
ADD index.html /app/code/index.html
|
|
ADD index.html /app/code/index.html
|
|
ADD start.sh /app/code/start.sh
|
|
ADD start.sh /app/code/start.sh
|
|
|
|
|
|
|
|
+# make cloudron exec sane
|
|
|
|
+WORKDIR /app/data
|
|
|
|
+
|
|
CMD [ "/app/code/start.sh" ]
|
|
CMD [ "/app/code/start.sh" ]
|