Skip to content

Commit 64c5e5d

Browse files
committed
[TASK] Automatically setup instance on first start
1 parent 82e4916 commit 64c5e5d

5 files changed

Lines changed: 49 additions & 13 deletions

File tree

.ddev/commands/host/launch

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/bin/bash
2+
3+
## Description: Launch a browser with the current site
4+
## Usage: launch [path]
5+
## Example: "ddev launch" or "ddev launch mypath"
6+
7+
FULLURL=${DDEV_PRIMARY_URL}
8+
9+
if [ -n "${1:-}" ] ; then
10+
if [[ ${1::1} != "/" ]] ; then
11+
FULLURL="${FULLURL}/";
12+
fi
13+
14+
FULLURL="${FULLURL}${1}";
15+
fi
16+
17+
case $OSTYPE in
18+
linux-gnu)
19+
xdg-open ${FULLURL}
20+
;;
21+
"darwin"*)
22+
open ${FULLURL}
23+
;;
24+
"win*"* | "msys"*)
25+
start ${FULLURL}
26+
;;
27+
esac

.ddev/config.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ timezone: ""
1717
hooks:
1818
post-start:
1919
- exec: composer install -d /var/www/html
20-
- exec: test -e /var/www/html/public/typo3conf/LocalConfiguration.php || touch /var/www/html/public/FIRST_INSTALL
21-
- exec-host: ddev launch
20+
- exec-host: ddev launch typo3
2221

2322

2423
# This config.yaml was created with ddev version v1.12.0-alpha2
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
version: '3.6'
2+
3+
services:
4+
web:
5+
environment:
6+
- TYPO3_CONTEXT=Development
7+
- TYPO3_INSTALL_DB_HOST=db
8+
- TYPO3_INSTALL_DB_PORT=3306
9+
- TYPO3_INSTALL_DB_USER=db
10+
- TYPO3_INSTALL_DB_PASSWORD=db
11+
- TYPO3_INSTALL_DB_DBNAME=db
12+
- TYPO3_INSTALL_ADMIN_USER=admin
13+
- TYPO3_INSTALL_ADMIN_PASSWORD=password
14+
- TYPO3_INSTALL_SITE_NAME=MySql 8 Test
15+
- TYPO3_INSTALL_SITE_SETUP_TYPE=site

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ Testing TYPO3 8.7 with Mysql 8
1414
and extract it on your local system
1515
* Go to the newly created folder in your bash / git-bash
1616
* Run `ddev start`
17-
* If you see the warning `Trusted hosts pattern mismatch` during the
18-
`System environment check`, click `I know what I'm doing, continue!`
17+
18+
Use user `admin` with password `password` to login to the backend or the install tool.

composer.json

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"description" : "TYPO3 CMS 8.7 with MySql 8",
44
"license": "GPL-3.0-or-later",
55
"require": {
6+
"typo3-console/composer-auto-commands": "^0.3.0",
67
"helhum/typo3-console": "^5.7.2",
78
"typo3/minimal": "^8",
89
"typo3/cms-about": "^8.7.29",
@@ -26,18 +27,12 @@
2627
"typo3/cms-wizard-crpages": "^8.7.29",
2728
"typo3/cms-wizard-sortpages": "^8.7.29"
2829
},
30+
"require-dev": {
31+
"typo3-console/composer-typo3-auto-install": "^0.3.1"
32+
},
2933
"repositories": [
3034
{ "type": "composer", "url": "https://composer.typo3.org/" }
3135
],
32-
"scripts":{
33-
"typo3-cms-scripts": [
34-
"typo3cms install:fixfolderstructure",
35-
"typo3cms install:generatepackagestates"
36-
],
37-
"post-autoload-dump": [
38-
"@typo3-cms-scripts"
39-
]
40-
},
4136
"extra": {
4237
"typo3/cms": {
4338
"web-dir": "public"

0 commit comments

Comments
 (0)