Skip to content
Snippets Groups Projects
Commit 43058840 authored by Griefed's avatar Griefed :joystick:
Browse files

Fix links, permissions, initial setup

parent 904a63ac
No related branches found
No related tags found
No related merge requests found
...@@ -66,18 +66,14 @@ RUN \ ...@@ -66,18 +66,14 @@ RUN \
zip && \ zip && \
echo "**** configure php, including symlink ****" && \ echo "**** configure php, including symlink ****" && \
ln -sf \ ln -sf \
/usr/bin/php7 \ /usr/bin/php7 \
/usr/bin/php && \ /usr/bin/php && \
sed -i \ sed -i \
-e "s#\output_buffering =.*#\output_buffering = \off#g" \ -e "s#\output_buffering =.*#\output_buffering = \off#g" \
-e "s/post_max_size =.*$/post_max_size = 1560M/" \ -e "s/post_max_size =.*$/post_max_size = 1560M/" \
-e "s/upload_max_filesize =.*$/upload_max_filesize = 2048M/" \ -e "s/upload_max_filesize =.*$/upload_max_filesize = 2048M/" \
-e 's#;session.save_path = "/tmp"#session.save_path = "/config/sess"#g' \ -e 's#;session.save_path = "/tmp"#session.save_path = "/config/sess"#g' \
/etc/php7/php.ini && \ /etc/php7/php.ini && \
echo "**** Cleanup ****" && \
rm -rf \
/root/.cache \
/tmp/* && \
echo "**** Misc ****" && \ echo "**** Misc ****" && \
echo ${ICECODER_VERSION} > /version.txt echo ${ICECODER_VERSION} > /version.txt
......
#!/usr/bin/with-contenv bash #!/usr/bin/with-contenv bash
ICECODER_VERSION=$(cat /version.txt) 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 \ curl -o /tmp/install.zip -L \
"https://github.com/icecoder/ICEcoder/archive/${ICECODER_VERSION}.zip" "https://github.com/icecoder/ICEcoder/archive/${ICECODER_VERSION}.zip"
cd /tmp || exit cd /tmp || exit
......
...@@ -6,13 +6,15 @@ ln -sf /plugins /app/ICEcoder/plugins ...@@ -6,13 +6,15 @@ ln -sf /plugins /app/ICEcoder/plugins
# permissions # permissions
chown -R abc:abc \ chown -R abc:abc \
/config \ /config \
/data \ /data \
/plugins /plugins
echo "[cont-init.d] Checking for lock.file"
# check for lock file to only run git operations once # check for lock file to only run git operations once
if [ ! -e /lock.file ]; then if [ ! -e /lock.file ]; then
# Give abc a sudo shell for development # Give abc a sudo shell for development
echo "Lock does not exist, cloning repository"
chsh abc -s /bin/bash chsh abc -s /bin/bash
sed -e 's/# %wheel ALL=(ALL) NOPASSWD: ALL/%wheel ALL=(ALL) NOPASSWD: ALL/g' \ sed -e 's/# %wheel ALL=(ALL) NOPASSWD: ALL/%wheel ALL=(ALL) NOPASSWD: ALL/g' \
-i /etc/sudoers -i /etc/sudoers
...@@ -26,7 +28,7 @@ if [ ! -e /lock.file ]; then ...@@ -26,7 +28,7 @@ if [ ! -e /lock.file ]; then
fi fi
else else
# lock exists not importing project this is a restart # lock exists not importing project this is a restart
echo "Lock exists just starting pylon" echo "Lock exists just starting ICEcoder"
fi fi
# create lock file after first run # create lock file after first run
...@@ -41,9 +43,9 @@ cp /config/php/php.ini /etc/php7/php.ini ...@@ -41,9 +43,9 @@ cp /config/php/php.ini /etc/php7/php.ini
mkdir -p /config/sessions mkdir -p /config/sessions
echo "[cont-init.d] Setting permissions this may take some time" echo "[cont-init.d] Setting permissions this may take some time"
chown -R abc:abc \ chown -R abc:abc \
/data \ /data \
/config \ /config \
/plugins /plugins
# make our folders # make our folders
mkdir -p \ mkdir -p \
/config/{log/ICEcoder,php,sess} /config/{log/ICEcoder,php,sess}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment