Replies: 19 comments
-
hi, the point of this whole deployer-extended-typo3 package is to keep deploy.php file as clean and small as possible so the deployment can be easily upgraded. My starting version of deploy.php file looks like this and it fits 80% of all deployments without any change.
In .env file I have:
.env file is out of git and different on each instance. You need to change INSTANCE="xxx" to the name of server defined in server('xxx',...) of deploy.php. This will allow the database operations to work. This is basically all. What I have in my TYPO3 is that the database settings from .env file are used in TYPO3 automatically so I do not need to keep it in second place somewhere in TYPO3 code. But I think you can start without it also. |
Beta Was this translation helpful? Give feedback.
-
I didnt even know that was possible. Thanks for your example deploy.php. I am sure that will get me started. That deployer package is really awesome I think, but I am just starting so I am not as experienced yet. |
Beta Was this translation helpful? Give feedback.
-
The .env file is then copied over before |
Beta Was this translation helpful? Give feedback.
-
Just run first deploy and when it will fail create .env (it will be already empty in /shared folder). |
Beta Was this translation helpful? Give feedback.
-
OK it worked now. I setup the TYPO3 instance (just blank database). When I deploy a new version (ie. I bumped TYPO3 CMS version via composer) TYPO3 then thinks its never been installed before. How can I prevent this? //Edit
|
Beta Was this translation helpful? Give feedback.
-
Thats because typo3conf/PackagesStates.php probably. If its absent TYPO3 thinks like it was not installed. Look at the script section in my composer.json.
|
Beta Was this translation helpful? Give feedback.
-
If you also want to do it like that then you must modify your composer.json reqs like:
|
Beta Was this translation helpful? Give feedback.
-
Meaning you have |
Beta Was this translation helpful? Give feedback.
-
Sure. I have typo3conf/LocalConfiguration.php in git. |
Beta Was this translation helpful? Give feedback.
-
Are you able to show your |
Beta Was this translation helpful? Give feedback.
-
Here you are:
|
Beta Was this translation helpful? Give feedback.
-
I dont see |
Beta Was this translation helpful? Give feedback.
-
I keep TYPO3 database creds in |
Beta Was this translation helpful? Give feedback.
-
Ooops, you already mentioned it. Sorry. I'm getting there, thanks a lot so far for your help! Let me buy you a beer sometime. ^^ |
Beta Was this translation helpful? Give feedback.
-
How can install extensions from composer which require database updates? I just installed ext:blog and it wouldnt work right away. First I had to disable/enable the extension. Something like this perhaps?
|
Beta Was this translation helpful? Give feedback.
-
BTW: Look that "deployer-extended-typo3" is installing for you "helhum/dotenv-connector". So remove database settings from LocalConfiguration.php and in your AdditionalConfiguration.php file (which I have also in git) you can use getenv('smth') to read values from .env and make database settings. |
Beta Was this translation helpful? Give feedback.
-
If you use:
then the |
Beta Was this translation helpful? Give feedback.
-
"Sometimes it fails". Thats a bummer. ;D |
Beta Was this translation helpful? Give feedback.
-
I never had time to debug this :) Not so critical as when deploy is done the |
Beta Was this translation helpful? Give feedback.
-
Hey,
I'm new to this deployer stuff and I have trouble understanding on how the final deploy.php file must look like when using your repo here.
Could you setup a small TYPO3 instance (can be empty) where you can actually test the deployer stuff on?
Or-- how an example deploy.php file might look like? The bare bones.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions