Browse Source

[gnusocial] Update config to match source

drymer 1 year ago
parent
commit
e5578ab5cd
Signed by: drymer <drymer@autistici.org> GPG Key ID: A307D64D5DDFDAAD
3 changed files with 12 additions and 13 deletions
  1. 5
    4
      gnusocial/Dockerfile
  2. 4
    6
      gnusocial/Dockerfile_daemons
  3. 3
    3
      gnusocial/stuff/start.sh

+ 5
- 4
gnusocial/Dockerfile View File

@@ -9,10 +9,11 @@ RUN chmod a+w /var/www/html/ && mkdir /var/www/html/avatar && chmod a+w \
9 9
     chmod a+w /var/www/html/file && mkdir -p /tmp/gnusocial && chmod \
10 10
     a+w /tmp/gnusocial && mkdir -p /run/nginx/
11 11
 
12
-RUN echo opcache.enable=1 >> /usr/local/etc/php.ini && sed -i \
13
-    "s/^mysqli.reconnect =.*/mysqli.reconnect = 1/" /usr/local/etc/php.ini && sed \
14
-    -i "s/pcntl_fork//;s/pcntl_wait,//;s/pcntl_wifexited,//;s/pcntl_wexitstatus,//;s/pcntl_wifsignaled,//;s/pcntl_wtermsig,//" \
15
-    /usr/local/etc/php.ini && sed -i "s/pm.max_requests = 5/pm.max_requests = 10/" /usr/local/etc/php-fpm.conf
12
+RUN echo "opcache.enable = 1" >> /usr/local/etc/php.ini
13
+RUN echo "pm.max_requests = 10" >> /usr/local/etc/php-fpm.conf
14
+
15
+RUN find /var/www/html -name '*.git' | xargs rm -r && apk del git && rm -rf \
16
+    /etc/apk/cache/
16 17
 
17 18
 COPY stuff/start.sh /opt/start.sh
18 19
 

+ 4
- 6
gnusocial/Dockerfile_daemons View File

@@ -1,6 +1,6 @@
1 1
 FROM php:7.2.8-fpm-alpine3.7
2 2
 
3
-RUN apk update && apk add nginx git curl libpng-dev icu-dev && docker-php-ext-install intl mysqli gd
3
+RUN apk update && apk add nginx git curl libpng-dev icu-dev && docker-php-ext-install intl mysqli gd pcntl
4 4
 
5 5
 RUN git clone https://git.gnu.io/gnu/gnu-social.git -b nightly /var/www/html/ && apk del git
6 6
 
@@ -9,11 +9,6 @@ RUN chmod a+w /var/www/html/ && mkdir /var/www/html/avatar && chmod a+w \
9 9
     chmod a+w /var/www/html/file && mkdir -p /tmp/gnusocial && chmod \
10 10
     a+w /tmp/gnusocial && mkdir -p /run/nginx/
11 11
 
12
-RUN echo opcache.enable=1 >> /usr/local/etc/php.ini && sed -i \
13
-    "s/^mysqli.reconnect =.*/mysqli.reconnect = 1/" /usr/local/etc/php.ini && sed \
14
-    -i "s/pcntl_fork//;s/pcntl_wait,//;s/pcntl_wifexited,//;s/pcntl_wexitstatus,//;s/pcntl_wifsignaled,//;s/pcntl_wtermsig,//" \
15
-    /usr/local/etc/php.ini && sed -i "s/pm.max_requests = 5/pm.max_requests = 10/" /usr/local/etc/php-fpm.conf
16
-
17 12
 RUN apk add -U git && git clone https://code.chromic.org/chimo/gs-reverseFavs \
18 13
     /var/www/html/plugins/ReverseFavs && git clone \
19 14
     https://code.chromic.org/chimo/gs-websubstates \
@@ -27,6 +22,9 @@ RUN apk add -U git && git clone https://code.chromic.org/chimo/gs-reverseFavs \
27 22
     https://code.chromic.org/chimo/gs-prettySimple \
28 23
     /var/www/html/theme/pretty-simple
29 24
 
25
+RUN echo "opcache.enable = 1" >> /usr/local/etc/php.ini
26
+RUN echo "pm.max_requests = 10" >> /usr/local/etc/php-fpm.conf
27
+
30 28
 RUN find /var/www/html -name '*.git' | xargs rm -r && apk del git && rm -rf \
31 29
     /etc/apk/cache/
32 30
 

+ 3
- 3
gnusocial/stuff/start.sh View File

@@ -1,14 +1,14 @@
1 1
 #!/bin/sh
2 2
 
3
-config_file="$WWW_ROOT/config.php"
3
+config_file="/var/www/html/config.php"
4 4
 if [ -e $config_file ]
5 5
 then
6 6
     startdaemons=$(grep "config\['queue'\]\['enabled'\]" $config_file | grep -i true)
7 7
     if [ -n "$startdaemons" ]
8 8
     then
9
-        /bin/sh $WWW_ROOT/scripts/startdaemons.sh
9
+        /bin/sh /var/www/html/scripts/startdaemons.sh
10 10
     fi
11
-    rm $WWW_ROOT/install.php
11
+    rm /var/www/html/install.php
12 12
 fi
13 13
 
14 14
 nginx -c /etc/nginx/nginx.conf -g "daemon on;"

Loading…
Cancel
Save