1
0
mirror of https://github.com/typemill/typemill.git synced 2025-10-23 02:26:02 +02:00

Docker first non-working attempt

This commit is contained in:
matbgn
2022-05-18 21:01:19 +02:00
parent 9688011d98
commit 487b8e3a89
8 changed files with 150 additions and 3 deletions

View File

@@ -0,0 +1,17 @@
#!/bin/sh
chown -R www-data:www-data /var/www/html
find /var/www/html -type d -exec chmod 570 {} \;
find /var/www/html -type f -exec chmod 460 {} \;
chown -R www-data:www-data /var/www/html/cache
find /var/www/html/cache -type d -exec chmod 770 {} \;
find /var/www/html/cache -type f -exec chmod 660 {} \;
chown -R www-data:www-data /var/www/html/content
find /var/www/html/content -type d -exec chmod 770 {} \;
find /var/www/html/content -type f -exec chmod 660 {} \;
chown -R www-data:www-data /var/www/html/media
find /var/www/html/media -type d -exec chmod 770 {} \;
find /var/www/html/media -type f -exec chmod 660 {} \;
chown -R www-data:www-data /var/www/html/settings
find /var/www/html/settings -type d -exec chmod 770 {} \;
find /var/www/html/settings -type f -exec chmod 660 {} \;

16
docker-utils/init-server Normal file
View File

@@ -0,0 +1,16 @@
#!/bin/sh
find /var/www/html -type d -empty -exec cp -R /tmp/* /var/www/html/ \;
cp -R /src/* /var/www/html/
cp -R /tmp/* /var/www/html/
/usr/local/bin/install-composer && \
./composer.phar update
usermod -u $PUID www-data
groupmod -g $PGID www-data
/usr/local/bin/adjust-rights
apache2-foreground

View File

@@ -0,0 +1,17 @@
#!/bin/sh
EXPECTED_CHECKSUM="$(php -r 'copy("https://composer.github.io/installer.sig", "php://stdout");')"
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
ACTUAL_CHECKSUM="$(php -r "echo hash_file('sha384', 'composer-setup.php');")"
if [ "$EXPECTED_CHECKSUM" != "$ACTUAL_CHECKSUM" ]
then
>&2 echo 'ERROR: Invalid installer checksum'
rm composer-setup.php
exit 1
fi
php composer-setup.php --quiet
RESULT=$?
rm composer-setup.php
exit $RESULT