فهرست منبع

Adjust to new base image

Johannes Zellner 8 سال پیش
والد
کامیت
a264dd7a5a
2فایلهای تغییر یافته به همراه14 افزوده شده و 9 حذف شده
  1. 13 8
      Dockerfile
  2. 1 1
      apache2-app.conf

+ 13 - 8
Dockerfile

@@ -1,8 +1,10 @@
 FROM cloudron/base:0.9.0
 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
 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 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 /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 index.html /app/code/index.html
 ADD start.sh /app/code/start.sh
 
+# make cloudron exec sane
+WORKDIR /app/data
+
 CMD [ "/app/code/start.sh" ]

+ 1 - 1
apache2-app.conf

@@ -9,7 +9,7 @@
         AllowOverride All
         Require all granted
 
-        <IfModule mod_php5.c>
+        <IfModule mod_php7.c>
             php_value memory_limit 64m
         </IfModule>
     </Directory>