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:
17
docker-utils/adjust-rights
Normal file
17
docker-utils/adjust-rights
Normal 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
16
docker-utils/init-server
Normal 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
|
17
docker-utils/install-composer
Normal file
17
docker-utils/install-composer
Normal 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
|
Reference in New Issue
Block a user