Procházet zdrojové kódy

Another pixelfed attempt

Bob Mottram před 6 roky
rodič
revize
514cd6140b

+ 1
- 1
src/freedombone-app-icecast Zobrazit soubor

@@ -30,7 +30,7 @@
30 30
 # You should have received a copy of the GNU Affero General Public License
31 31
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
32 32
 
33
-VARIANTS='full'
33
+VARIANTS='full full-vim'
34 34
 
35 35
 IN_DEFAULT_INSTALL=0
36 36
 SHOW_ON_ABOUT=1

+ 25
- 2
src/freedombone-app-pixelfed Zobrazit soubor

@@ -29,7 +29,7 @@
29 29
 # You should have received a copy of the GNU Affero General Public License
30 30
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
31 31
 
32
-VARIANTS=''
32
+VARIANTS='full full-vim'
33 33
 
34 34
 IN_DEFAULT_INSTALL=0
35 35
 SHOW_ON_ABOUT=1
@@ -293,6 +293,7 @@ function install_pixelfed {
293 293
     apt-get -yq install php-gettext php-curl php-gd php-mysql git curl
294 294
     apt-get -yq install memcached php-memcached php-intl exiftool libfcgi0ldbl
295 295
     apt-get -yq install redis-server php-redis autoconf imagemagick imagemagick-dev libtool
296
+    apt-get -yq install jpegoptim
296 297
 
297 298
     if [ ! "$PIXELFED_DOMAIN_NAME" ]; then
298 299
         echo $'No domain name was given'
@@ -320,7 +321,16 @@ function install_pixelfed {
320 321
     git checkout "$PIXELFED_COMMIT" -b "$PIXELFED_COMMIT"
321 322
     set_completion_param "pixelfed commit" "$PIXELFED_COMMIT"
322 323
 
323
-    install_composer
324
+    install_composer --no-dev
325
+
326
+    if [ ! -f "/var/www/$PIXELFED_DOMAIN_NAME/htdocs/.env.example" ]; then
327
+        echo $"Can't find .env.example"
328
+        exit 346826285
329
+    fi
330
+    cp "/var/www/$PIXELFED_DOMAIN_NAME/htdocs/.env.example" "/var/www/$PIXELFED_DOMAIN_NAME/htdocs/.env"
331
+
332
+    php artisan key:generate
333
+    php artisan storage:link
324 334
 
325 335
     chmod g+w "/var/www/$PIXELFED_DOMAIN_NAME/htdocs"
326 336
     chown -R www-data:www-data "/var/www/$PIXELFED_DOMAIN_NAME/htdocs"
@@ -419,6 +429,19 @@ function install_pixelfed {
419 429
 
420 430
     create_site_certificate "$PIXELFED_DOMAIN_NAME" 'yes'
421 431
 
432
+    cd "/var/www/$PIXELFED_DOMAIN_NAME/htdocs" || exit 365845635
433
+
434
+    # hack: within vendor/laravel/framework/src/Illuminate/database/Schema/Blueprint.php
435
+    # change return $this->addColumn('json', $column);
436
+    # to return $this->addColumn('text', $column);
437
+    if [ -f vendor/laravel/framework/src/Illuminate/database/Schema/Blueprint.php ]; then
438
+        sed -i "s|\$this->addColumn('json', \$column);|\$this->addColumn('text', \$column);|g" vendor/laravel/framework/src/Illuminate/database/Schema/Blueprint.php
439
+    else
440
+        find . -name Blueprint.php
441
+    fi
442
+
443
+    php artisan migrate:fresh
444
+
422 445
     nginx_ensite "$PIXELFED_DOMAIN_NAME"
423 446
 
424 447
     systemctl restart mariadb

+ 3
- 1
src/freedombone-utils-web Zobrazit soubor

@@ -1074,6 +1074,8 @@ function create_default_web_site {
1074 1074
 }
1075 1075
 
1076 1076
 function install_composer {
1077
+    composer_options="$1"
1078
+
1077 1079
     # curl -sS https://getcomposer.org/installer | php
1078 1080
     if [ -f "${HOME}/${PROJECT_NAME}/image_build/composer_install" ]; then
1079 1081
         php < "${HOME}/${PROJECT_NAME}/image_build/composer_install"
@@ -1085,7 +1087,7 @@ function install_composer {
1085 1087
     if [ -f composer.phar ]; then
1086 1088
         cp composer.phar composer
1087 1089
     fi
1088
-    if ! php composer.phar install; then
1090
+    if ! php composer.phar install "$composer_options"; then
1089 1091
         echo $'Unable to run composer install'
1090 1092
         exit 7252198
1091 1093
     fi