From 57c23cfe5bba9465386b10c583dbb87ccd8392af Mon Sep 17 00:00:00 2001
From: Griefed <griefed@griefed.de>
Date: Sat, 17 Oct 2020 23:04:16 +0200
Subject: [PATCH] Meep Meep permissions are sheet

---
 Dockerfile                      | 19 -------------
 root/defaults/default           | 50 ---------------------------------
 root/defaults/ssmtp.conf        |  6 ----
 root/etc/cont-init.d/50-install |  2 --
 root/etc/cont-init.d/60-config  |  8 ------
 5 files changed, 85 deletions(-)
 delete mode 100644 root/defaults/default
 delete mode 100644 root/defaults/ssmtp.conf

diff --git a/Dockerfile b/Dockerfile
index 426c512..42e1c46 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -4,11 +4,9 @@ LABEL maintainer="Griefed <griefed@griefed.de>"
 
 ARG ICECODER_VERSION=8.0beta
 
-# Install dependencies, download app, build app, remove unneeded stuff
 RUN \
         echo "**** install dependencies and build tools and stuff ****" && \
         apk add --no-cache \
-            acl \
             alpine-base \
             bzip2 \
             curl \
@@ -17,26 +15,19 @@ RUN \
             git \
             gzip \
             imagemagick \
-            jq \
             libxml2 \
             libzip \
             libzip-dev \
             libzip-doc \
             libzip-tools \
-            memcached \
             php7 \
-            php7-apcu \
-            php7-bcmath \
             php7-bz2 \
-            php7-calendar \
             php7-ctype \
             php7-curl \
-            php7-dba \
             php7-dom \
             php7-exif \
             php7-fileinfo \
             php7-fpm \
-            php7-ftp \
             php7-gd \
             php7-gettext \
             php7-gmp \
@@ -45,9 +36,6 @@ RUN \
             php7-imap \
             php7-intl \
             php7-json \
-            php7-ldap \
-            php7-mcrypt \
-            php7-memcached \
             php7-mysqli \
             php7-mysqlnd \
             php7-opcache \
@@ -61,21 +49,14 @@ RUN \
             php7-phar \
             php7-posix \
             php7-pspell \
-            php7-redis \
-            php7-snmp \
             php7-sodium \
             php7-sqlite3 \
-            php7-ssh2 \
             php7-tokenizer \
             php7-xml \
             php7-xmlreader \
             php7-xmlrpc \
             php7-zip \
-            re2c \
-            rsync \
-            samba-client \
             sqlite \
-            ssmtp \
             subversion \
             sudo \
             tar \
diff --git a/root/defaults/default b/root/defaults/default
deleted file mode 100644
index aafad6a..0000000
--- a/root/defaults/default
+++ /dev/null
@@ -1,50 +0,0 @@
-server {
-    listen 443 ssl;
-    server_name _;
-    root /config/www/ICEcoder;
-    index index.php;
-    client_max_body_size 20G;
-    add_header X-Frame-Options "SAMEORIGIN";
-    ssl on;
-    ssl_certificate /config/keys/cert.crt;
-    ssl_certificate_key /config/keys/cert.key;
-    add_header Strict-Transport-Security "max-age=16070400; includeSubdomains";
-    keepalive_requests    10;
-    keepalive_timeout     60 60;
-    access_log /config/log/ICEcoder/access_ICEcoder6_log;
-    error_log /config/log/ICEcoder/error_ICEcoder6_log;
-    client_body_buffer_size 128k;
-    if (!-e $request_filename){
-        rewrite ^/data/public/([a-zA-Z0-9_-]+)$ /public/$1? permanent;
-        rewrite ^(.*)$ /index.php last;
-    }
-    location ~* ^/(?:\.|conf|data/(?:files|personal|logs|plugins|tmp|cache)|plugins/editor.zoho/agent/files) {
-            deny all;
-    }
-    location ~ \.php$ {
-            fastcgi_param  GATEWAY_INTERFACE  CGI/1.1;
-            fastcgi_param  SERVER_SOFTWARE    nginx;
-            fastcgi_param  QUERY_STRING       $query_string;
-            fastcgi_param  REQUEST_METHOD     $request_method;
-            fastcgi_param  CONTENT_TYPE       $content_type;
-            fastcgi_param  CONTENT_LENGTH     $content_length;
-            fastcgi_param  SCRIPT_FILENAME    $document_root$fastcgi_script_name;
-            fastcgi_param  SCRIPT_NAME        $fastcgi_script_name;
-            fastcgi_param  REQUEST_URI        $request_uri;
-            fastcgi_param  DOCUMENT_URI       $document_uri;
-            fastcgi_param  DOCUMENT_ROOT      $document_root;
-            fastcgi_param  SERVER_PROTOCOL    $server_protocol;
-            fastcgi_param  REMOTE_ADDR        $remote_addr;
-            fastcgi_param  REMOTE_PORT        $remote_port;
-            fastcgi_param  SERVER_ADDR        $server_addr;
-            fastcgi_param  SERVER_PORT        $server_port;
-            fastcgi_param  SERVER_NAME        $server_name;
-            try_files $uri =404;
-            fastcgi_pass 127.0.0.1:9000;
-    }
-    location ~* \.(ico|css|js)$ {
-        expires 7d;
-        add_header Pragma public;
-        add_header Cache-Control "public, must-revalidate, proxy-revalidate";
-    }
-}
diff --git a/root/defaults/ssmtp.conf b/root/defaults/ssmtp.conf
deleted file mode 100644
index 8111c72..0000000
--- a/root/defaults/ssmtp.conf
+++ /dev/null
@@ -1,6 +0,0 @@
-root=<your_email>
-mailhub=smtp.gmail.com:587
-AuthUser=<your_email>
-AuthPass=<your_password>
-UseSTARTTLS=YES
-FromLineOverride=YES
diff --git a/root/etc/cont-init.d/50-install b/root/etc/cont-init.d/50-install
index 6622670..3635f94 100644
--- a/root/etc/cont-init.d/50-install
+++ b/root/etc/cont-init.d/50-install
@@ -6,8 +6,6 @@ if [ ! -f "/config/www/ICEcoder/index.php" ]; then
 		"https://github.com/icecoder/ICEcoder/archive/${ICECODER_VERSION}.zip"
 	cd /tmp || exit
 	unzip -qq install.zip
-	mkdir -p /data/plugins
-	mv ICEcoder-*/plugins/* /data/plugins
 	mv ICEcoder-* /app/ICEcoder
 	cd / || exit
 	rm -rf /tmp/* /config/www/data
diff --git a/root/etc/cont-init.d/60-config b/root/etc/cont-init.d/60-config
index 23ec6db..ef9d967 100644
--- a/root/etc/cont-init.d/60-config
+++ b/root/etc/cont-init.d/60-config
@@ -28,7 +28,6 @@ echo "[cont-init.d] Setting permissions this may take some time"
 chown -R abc:abc \
  /data \
  /config
- /data/plugins
 # make our folders
 mkdir -p \
 /config/{log/ICEcoder,php,sess}
@@ -38,13 +37,6 @@ mkdir -p \
 cp /etc/php7/php.ini /config/php/php.ini
 cp /config/php/php.ini /etc/php7/php.ini
 
-# setting email config file.
-if [ ! -f "/config/ssmtp.conf" ]; then
-cp /defaults/ssmtp.conf /config/ssmtp.conf
-chown abc:abc /config/ssmtp.conf
-fi
-cp /config/ssmtp.conf /etc/ssmtp/ssmtp.conf
-
 # Link data, code and plugins
 ln -sf /data/code /app/ICEcoder/data
 ln -sf /data/plugins /app/ICEcoder/plugins
-- 
GitLab