|
1 | 1 | #!/bin/bash
|
2 | 2 |
|
| 3 | +## Description: Install TYPO3 10 with t3api linked to it. |
| 4 | +## Usage: install-v10 |
| 5 | +## Example: "ddev install-v10" |
| 6 | + |
3 | 7 | VERSION=v10
|
4 |
| -DATABASE=database_${VERSION} |
| 8 | +DATABASE=database_$VERSION |
| 9 | +BASE_PATH=/var/www/html/.test/$VERSION |
| 10 | + |
| 11 | +[ -L /var/www/html/.test/t3api ] || ln -sr /var/www/html/ /var/www/html/.test/t3api |
| 12 | +rm -rf $BASE_PATH |
| 13 | +mkdir -p $BASE_PATH |
5 | 14 |
|
6 |
| -rm -rf /var/www/html/$VERSION/* |
7 | 15 | mysql -uroot -proot -e "DROP DATABASE IF EXISTS $DATABASE"
|
8 | 16 |
|
9 |
| -cd /var/www/html/$VERSION |
10 |
| - |
11 |
| -composer init --name=sourcebroker/typo3$VERSION --description=TYPO3$VERSION -n -d /var/www/html/$VERSION |
12 |
| -composer config extra.typo3/cms.web-dir public -d /var/www/html/$VERSION |
13 |
| -composer config repositories.$EXTENSION_KEY path ../$EXTENSION_KEY -d /var/www/html/$VERSION |
14 |
| -composer req typo3/minimal:'^10.4' typo3/cms-extensionmanager:'^10.4' helhum/typo3-console:'^6.3' jigal/t3adminer:'^9.4' georgringer/news:'^8.0' sourcebroker/t3api:'@dev' sourcebroker/t3apinews:'@dev' --no-progress -n -d /var/www/html/$VERSION |
15 |
| - |
16 |
| -vendor/bin/typo3cms install:setup -n --database-name $DATABASE |
17 |
| -vendor/bin/typo3cms configuration:set 'BE/debug' 1 |
18 |
| -vendor/bin/typo3cms configuration:set 'BE/lockSSL' true |
19 |
| -vendor/bin/typo3cms configuration:set 'FE/debug' 1 |
20 |
| -vendor/bin/typo3cms configuration:set 'SYS/devIPmask' '*' |
21 |
| -vendor/bin/typo3cms configuration:set 'SYS/displayErrors' 1 |
22 |
| -vendor/bin/typo3cms configuration:set 'SYS/trustedHostsPattern' '.*.*' |
23 |
| -vendor/bin/typo3cms configuration:set 'MAIL/transport' 'smtp' |
24 |
| -vendor/bin/typo3cms configuration:set 'MAIL/transport_smtp_server' 'localhost:1025' |
25 |
| -vendor/bin/typo3cms configuration:set 'GFX/processor' 'ImageMagick' |
26 |
| -vendor/bin/typo3cms configuration:set 'GFX/processor_path' '/usr/bin/' |
27 |
| -vendor/bin/typo3cms configuration:set 'GFX/processor_path_lzw' '/usr/bin/' |
28 |
| -vendor/bin/typo3cms install:generatepackagestates |
29 |
| - |
30 |
| -sed -i -e "s/base: ht\//base: \//g" /var/www/html/$VERSION/config/sites/main/config.yaml |
31 |
| -sed -i -e 's/base: \/en\//base: \//g' /var/www/html/$VERSION/config/sites/main/config.yaml |
32 |
| -printf "imports:\n -\n resource: 'EXT:$EXTENSION_KEY/Configuration/Routing/config.yaml'" >> /var/www/html/$VERSION/config/sites/main/config.yaml |
33 |
| - |
34 |
| -cp -r "/var/www/html/$EXTENSION_KEY/.ddev/data-init/fileadmin/" "/var/www/html/$VERSION/public/" |
35 |
| -mysql -uroot -proot $DATABASE < "/var/www/html/$EXTENSION_KEY/.ddev/data-init/$DATABASE.sql" |
36 |
| - |
37 |
| -vendor/bin/typo3cms database:updateschema |
38 |
| -vendor/bin/typo3cms cache:flush |
| 17 | +composer init --name=sourcebroker/typo3$VERSION --description=TYPO3$VERSION --no-interaction --working-dir $BASE_PATH |
| 18 | +composer config extra.typo3/cms.web-dir public --working-dir $BASE_PATH |
| 19 | +composer config repositories.$EXTENSION_KEY path ../$EXTENSION_KEY --working-dir $BASE_PATH |
| 20 | +composer req typo3/minimal:'^10.4' helhum/typo3-console:'^6.3' jigal/t3adminer:'^9.4' georgringer/news:'^8.0' \ |
| 21 | + sourcebroker/t3api:'@dev' sourcebroker/t3apinews:'@dev' \ |
| 22 | + --no-progress --no-interaction --working-dir $BASE_PATH |
| 23 | + |
| 24 | +$BASE_PATH/vendor/bin/typo3cms install:setup -n --database-name $DATABASE |
| 25 | +$BASE_PATH/vendor/bin/typo3cms configuration:set 'BE/debug' 1 |
| 26 | +$BASE_PATH/vendor/bin/typo3cms configuration:set 'BE/lockSSL' true |
| 27 | +$BASE_PATH/vendor/bin/typo3cms configuration:set 'FE/debug' 1 |
| 28 | +$BASE_PATH/vendor/bin/typo3cms configuration:set 'SYS/devIPmask' '*' |
| 29 | +$BASE_PATH/vendor/bin/typo3cms configuration:set 'SYS/displayErrors' 1 |
| 30 | +$BASE_PATH/vendor/bin/typo3cms configuration:set 'SYS/trustedHostsPattern' '.*.*' |
| 31 | +$BASE_PATH/vendor/bin/typo3cms configuration:set 'MAIL/transport' 'smtp' |
| 32 | +$BASE_PATH/vendor/bin/typo3cms configuration:set 'MAIL/transport_smtp_server' 'localhost:1025' |
| 33 | +$BASE_PATH/vendor/bin/typo3cms configuration:set 'GFX/processor' 'ImageMagick' |
| 34 | +$BASE_PATH/vendor/bin/typo3cms configuration:set 'GFX/processor_path' '/usr/bin/' |
| 35 | +$BASE_PATH/vendor/bin/typo3cms configuration:set 'GFX/processor_path_lzw' '/usr/bin/' |
| 36 | +$BASE_PATH/vendor/bin/typo3cms install:generatepackagestates |
| 37 | + |
| 38 | +sed -i -e "s/base: ht\//base: \//g" $BASE_PATH/config/sites/main/config.yaml |
| 39 | +sed -i -e 's/base: \/en\//base: \//g' $BASE_PATH/config/sites/main/config.yaml |
| 40 | +printf "imports:\n -\n resource: 'EXT:$EXTENSION_KEY/Configuration/Routing/config.yaml'" >> $BASE_PATH/config/sites/main/config.yaml |
| 41 | + |
| 42 | +cp -r "$BASE_PATH/../$EXTENSION_KEY/.ddev/data-init/fileadmin/" "$BASE_PATH/public/" |
| 43 | +mysql -uroot -proot $DATABASE < "$BASE_PATH/../$EXTENSION_KEY/.ddev/data-init/$DATABASE.sql" |
| 44 | + |
| 45 | +$BASE_PATH/vendor/bin/typo3cms database:updateschema |
| 46 | +$BASE_PATH/vendor/bin/typo3cms cache:flush |
0 commit comments