diff --git a/Dockerfile b/Dockerfile index 5e9c3f32678aae30f984b4dba8b785b1c0c7b07c..4a60fe7c1f1ab0d1afdbb6b33b8644fb748ce410 100644 --- a/Dockerfile +++ b/Dockerfile @@ -66,18 +66,14 @@ RUN \ zip && \ echo "**** configure php, including symlink ****" && \ ln -sf \ - /usr/bin/php7 \ - /usr/bin/php && \ + /usr/bin/php7 \ + /usr/bin/php && \ sed -i \ - -e "s#\output_buffering =.*#\output_buffering = \off#g" \ - -e "s/post_max_size =.*$/post_max_size = 1560M/" \ - -e "s/upload_max_filesize =.*$/upload_max_filesize = 2048M/" \ - -e 's#;session.save_path = "/tmp"#session.save_path = "/config/sess"#g' \ - /etc/php7/php.ini && \ - echo "**** Cleanup ****" && \ - rm -rf \ - /root/.cache \ - /tmp/* && \ + -e "s#\output_buffering =.*#\output_buffering = \off#g" \ + -e "s/post_max_size =.*$/post_max_size = 1560M/" \ + -e "s/upload_max_filesize =.*$/upload_max_filesize = 2048M/" \ + -e 's#;session.save_path = "/tmp"#session.save_path = "/config/sess"#g' \ + /etc/php7/php.ini && \ echo "**** Misc ****" && \ echo ${ICECODER_VERSION} > /version.txt diff --git a/root/etc/cont-init.d/40-install b/root/etc/cont-init.d/50-install similarity index 90% rename from root/etc/cont-init.d/40-install rename to root/etc/cont-init.d/50-install index 6e7334ae426e4dab659c0ff573b7422d63416aa3..40e90c7d63c8e33c5993fabbfeca56c65645eb3c 100644 --- a/root/etc/cont-init.d/40-install +++ b/root/etc/cont-init.d/50-install @@ -1,7 +1,7 @@ #!/usr/bin/with-contenv bash ICECODER_VERSION=$(cat /version.txt) -if [ ! -f "/config/www/ICEcoder/index.php" ]; then +if [ ! -f "/app/ICEcoder/index.php" ]; then curl -o /tmp/install.zip -L \ "https://github.com/icecoder/ICEcoder/archive/${ICECODER_VERSION}.zip" cd /tmp || exit diff --git a/root/etc/cont-init.d/50-config b/root/etc/cont-init.d/60-config similarity index 83% rename from root/etc/cont-init.d/50-config rename to root/etc/cont-init.d/60-config index dced70d537e7a2f5c9b58254b653c147d945aa1a..079ba5fb790365f7f1ba1eeba60a6a89341c4760 100644 --- a/root/etc/cont-init.d/50-config +++ b/root/etc/cont-init.d/60-config @@ -6,13 +6,15 @@ ln -sf /plugins /app/ICEcoder/plugins # permissions chown -R abc:abc \ -/config \ -/data \ -/plugins + /config \ + /data \ + /plugins +echo "[cont-init.d] Checking for lock.file" # check for lock file to only run git operations once if [ ! -e /lock.file ]; then # Give abc a sudo shell for development + echo "Lock does not exist, cloning repository" chsh abc -s /bin/bash sed -e 's/# %wheel ALL=(ALL) NOPASSWD: ALL/%wheel ALL=(ALL) NOPASSWD: ALL/g' \ -i /etc/sudoers @@ -26,7 +28,7 @@ if [ ! -e /lock.file ]; then fi else # lock exists not importing project this is a restart - echo "Lock exists just starting pylon" + echo "Lock exists just starting ICEcoder" fi # create lock file after first run @@ -41,9 +43,9 @@ cp /config/php/php.ini /etc/php7/php.ini mkdir -p /config/sessions echo "[cont-init.d] Setting permissions this may take some time" chown -R abc:abc \ - /data \ - /config \ - /plugins + /data \ + /config \ + /plugins # make our folders mkdir -p \ -/config/{log/ICEcoder,php,sess} + /config/{log/ICEcoder,php,sess}