Comments (8)
You shouldn't commit LocalConfiguration.php
. It contains secret information and environment specific settings.
You should commit AdditionalConfiguration.php
because it's where you'd add your custom configuration functionality that can't / shouldn't be added to LocalConfiguration.php
.
I argue that this line need to be removed:
TYPO3.CMS.BaseDistribution/.gitignore
Line 11 in 5a37398
from typo3.cms.basedistribution.
Hey @unn
Looks not so bad. The fileadmin folder you normally never commit, so fine here. The only thing I see is public/typo3conf/, where you normally commit the LocalConfiguration.php and perhaps PackageStates.php and AdditionalConfiguration.php. The public/typo3conf/.gitignore is created by DDEV btw which additionally ignores the AdditionalConfiguration.php.
Final conclusion: it's not a bad start and you always can adapt the .gitignore to your needs!
from typo3.cms.basedistribution.
@unn Are you ok with closing this issue or do you still think something has to be changed?
from typo3.cms.basedistribution.
I think something needs to be changed, not sure exactly what though. With a mind towards the new user experience, deploying directly via git, I would assume that this distro should result in a functional site. It does not. And I can't find great docs on how to unwind the .gitignore
to suit this use case well. Otherwise, I would have submitted a PR.
from typo3.cms.basedistribution.
Well, deploying directly with git is not option imho as you always have to run composer install --no-dev
during your deployment. Ok one could say using git hooks for this but you will be happier using a professional deployment tool like TYPO3 Surf, Deployer, Magallanes etc. etc.
As already said public/fileadmin
will never ever be commited to a repo as it can contain terra bytes of binary data which makes absolutely no sense to put it in revisioning.
The second mentioned one the index.php is created by the cms-composer-installers package during composer install / update and does also not need to be commited.
I guess you also look for a best practise for DDEV Live? Maybe we better continue the discussion at Slack in #ddev or #ddev-live...
from typo3.cms.basedistribution.
I am new to Typo3 but not to the PHP/CMS world.
Welcome to TYPO3 👍
My gut says that I need most of these files in the repo.
Actually, the current .gitignore exactly reflects which files should be committed and which ones should not.
I don't know best practices for which directories and files are safe to commit so that I don't pollute my repo with secrets.
Unfortunately there is no canonical way to pull in secrets into TYPO3 configuration.
The most accepted (and also most simple way I guess) is using env vars and pulling in the env vars in typo3conf/AdditionalConfiguration.php
. For a very simple way to set your env vars, helhum/dotenv-connector is recommended.
And it seems like some paths, public/fileadmin/ and public/index.php, shouldn't be ignored in the first place.
That is wrong. public/fileadmin
is the folder in which TYPO3 editors add files. This folder absolutely does not belong in version control. public/index.php
is generated automatically, thus also does not belong in version control.
The public/typo3conf/.gitignore is created by DDEV btw which additionally ignores the AdditionalConfiguration.php.
That basically conflicts with the main .gitignore of this dist. Not sure how this can be resolved
cleanly and consistently, because this file is required 99% of the time to be committed for production.
But that rather is a question for TYPO3 (introducing canonical way of handling secrets) and ddev (using the new feature)
@unn Do you have further questions? Then, as Simon already wrote, you're welcome to join Slack, which might allow an easier way of direct communication.
from typo3.cms.basedistribution.
You shouldn't commit LocalConfiguration.php. It contains secret information and environment specific settings.
As already stated above, there are several ways to not include the secret and environment specific data in LocalConfiguration.php:
- use AdditionalConfiguration.php
- put it in .env and use the dotenv connector
I am currently not sure, what the "official recommendation" is, I think that might be a good idea to sort that out and add the information to the official "Installation guide". Apart from that, anything that @helhum says is already pretty much official for me - especially for the topics Composer and base distribution.
I generally agree - some things should be made easier for new users - but it is not always to figure out how.
The topic deployment is currently underdocumented. I would expect a minimal documentation for that, also in the "Installation Guide".
from typo3.cms.basedistribution.
The public/typo3conf/.gitignore is created by DDEV btw which additionally ignores the AdditionalConfiguration.php.
That basically conflicts with the main .gitignore of this dist. Not sure how this can be resolved cleanly and consistently, because this file is required 99% of the time to be committed for production. But that rather is a question for TYPO3 (introducing canonical way of handling secrets) and ddev (using the new feature)
There are multiple ways. DDEV tries to set some sane defaults to get a project running out-of-the-box. Once the project is correctly setup I'd suggest to set disable_settings_management
to true
in the .ddev/config.yaml
see https://ddev.readthedocs.io/en/stable/users/extend/config_yaml/. Then the .gitignore
will not longer be created by DDEV and you can properly manage the AdditionalConfiguration.php
on your own. Just copy the DDEV's presets and modify the file to your needs.
from typo3.cms.basedistribution.
@gilbertsoft thanks for linking this issues.
Please, give me hard reasons why i should put LocalConfiguration in git.
Please, this is a strong issue for me. I collected 6 daily issues against (#49).
The only pro reasons, I know, are:
- everyone does that
- it's the .gitignore from typo3
- I want to save 1 minute livetime when checking out an old project
If there are more - let me know.
from typo3.cms.basedistribution.
Related Issues (20)
- Installation Information in README.md differs from the official Install Guide HOT 7
- Not possible to package new version 9 LTS of TYPO3 Core HOT 6
- typo3 folder is placed in public/ instead of vendor/typo3 - bug or feature? HOT 1
- Unable to create backend admin user within "The Install Tool" (Unknown column 'username' in 'field list') HOT 2
- helhum/typo3-console missing in 10.x and master Branches HOT 2
- ext:lowlevel is not installed HOT 4
- Latest TYPO3 version 10.4.7 is not installed HOT 5
- Define composer package type HOT 4
- typo3 installation fails in install:generatepackagestate with exitcode 255 HOT 3
- Current distribution is not installable HOT 2
- Composer installation fails at 96/98 HOT 3
- LocalConfiguration.php is excluded in .gitignore HOT 8
- Broken release/tag 10.4.2 - pointing to *@dev instead of stable core packages HOT 7
- Composer based install fails for DOCROOT != public HOT 5
- Example command for unattended setup fails HOT 1
- Version 12.4 needs "typo3/cms-lowlevel" HOT 4
- Clearing cache doesn't work on an expired session but the platform doesn't shows this
- Incorrect version constraints used in composer.json HOT 1
- Update master branch to install typo3/cms-* dev-master or 9.5.*@dev
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from typo3.cms.basedistribution.