Download the PHP package madj2k/t3-surf without Composer
On this page you can find all versions of the php package madj2k/t3-surf. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download madj2k/t3-surf
More information about madj2k/t3-surf
Files in madj2k/t3-surf
Informations about the package t3-surf
Stages of deployment
When running a deployment the following stages and corresponding tasks are executed.
Stage 1: initialize
This is normally used only for an initial deployment to an instance. At this stage you may prefill certain directories for example.
- TYPO3\Surf\Task\Generic\CreateDirectoriesTask
- TYPO3\Surf\Task\CreateDirectoriesTask
- TYPO3\Surf\Task\DumpDatabaseTask (wenn initialDeployment == true)
- TYPO3\Surf\Task\RsyncFoldersTask (wenn initialDeployment == true)
Stage 2: lock deployment
Lock deployment
BEFORE:
- TYPO3\Surf\Task\UnlockDeploymentTask (wenn --force-run)
REGULAR:
- TYPO3\Surf\Task\LockDeploymentTask
Stage 3: package
This stage is where you normally package all files and assets, which will be transferred to the next stage.
- TYPO3\Surf\Task\Package\GitTask
TYPO3\Surf\DefinedTask\Composer\LocalInstallTask- Madj2k\Surf\Task\Local\File\CopyEnvTask
- Madj2k\Surf\Task\Local\File\CopyHtaccessTask
- Madj2k\Surf\Task\Local\File\CopyAdditionalConfigurationTask
- Madj2k\Surf\Task\Local\File\FixPermissionsTask
- Madj2k\Surf\Task\Local\Git\SetFileModeIgnoreTask
- Madj2k\Surf\Task\Local\Composer\InstallStagingTask OR Madj2k\Surf\Task\Local\Composer\InstallProductionTask
Stage 4: transfer
Here all tasks are located which serve to transfer the assets from your local computer to the node, where the application runs.
- TYPO3\Surf\Task\Transfer
AFTER:
- Madj2k\Surf\Task\Remote\File\CreateVarFoldersTask
- TYPO3\Surf\Task\Generic\CreateSymlinksTask
- TYPO3\Surf\Task\TYPO3\CMS\CreatePackageStatesTask
Stage 5: update
Update the application assets on the node
BEFORE:
- Madj2k\Surf\Task\Remote\CMS\LockForEditorsTask
REGULAR:
- Madj2k\Surf\Task\Remote\CMS\UpgradeTask
AFTER:
- TYPO3\Surf\Task\TYPO3\CMS\SymlinkDataTask
TYPO3\Surf\Task\TYPO3\CMS\CopyConfigurationTask
Stage 6: migrate
Migrate (Doctrine, custom)
TYPO3\Surf\Task\TYPO3\CMS\SetUpExtensionsTask- TYPO3\Surf\Task\TYPO3\CMS\CompareDatabaseTask
Stage 7: finalize
Prepare final release (e.g. warmup)
REGULAR:
- Madj2k\Surf\Task\Remote\File\FixPermissionsTask
- Madj2k\Surf\Task\Remote\TYPO3\CMS\FixFolderStructureTask
AFTER:
- Madj2k\Surf\Task\Remote\File\CopyDummyFilesTask (only if NOT on production!)
Stage 8: test
Smoke test
Stage 9: Switch
Do symlink to current release. This is the crucial stage. Here the old live instance is switched with the new prepared instance. Normally the new instance is symlinked.
- TYPO3\Surf\Task\SymlinkReleaseTask
AFTER:
- TYPO3\Surf\Task\TYPO3\CMS\FlushCachesTask
Stage 10: cleanup
Delete temporary files or previous releases
- TYPO3\Surf\Task\CleanupReleasesTask
Stage 11: unlock
Unlock deployment
- TYPO3\Surf\Task\UnlockDeploymentTask
- Madj2k\Surf\Task\Remote\TYPO3\CMS\UnlockForEditorsTask
AFTER:
- Madj2k\Surf\Task\Remote\EmailNotification
Folders and files for your deployment project
If you want to deploy your TYPO3 project with this extension, you should create a few folder structures and files to be able to use the full potential.
Folder: .surf
Contains the configuration for the TYPO3 extension Surf for deployment and the corresponding Deployment-Scripts.
File: .surf/Production.php
File: .surf/Staging.php
Folder: .surf/Credentials
Contains the access data for the respective environments. IMPORTANT: Do not put these files into your versioning!
Example:
File: .htaccess.dev / .htaccess.prod / .htaccess.stage / .nginx.dev / .nginx.prod / .nginx.stage
Contains the settings for the given environment. You can use .htaccess for Apache or .nginx for Nginx. Will be deployed automatically.
File: .htpasswd.dev / .htpasswd.prod / _.htpasswd.stage
Same as _htaccess.*
File: composer.json
Contains the packages to install.
To be able to install packages that themselves have dependencies on packages that are only available as @dev, you need to specify the minimum-stabilty
in combination with prefer-stable
.
With preferred-install
you can specify that certain packages should be installed as GIT repositories so that you can work on them directly.
Folder: dummy
Contains dummy files for sys_file-references. The content of this folder will be deployed on your stage-environment (of course not on production!)
File: .env.dev / .env.prod / _.env.stage
This file contains a list of all extensions to be activated in the given enviroment.
If this file is copied to .env
before installation, the package "helhum/dotenv-connector" will automatically create a corresponding PackageStates.php
.
Example:
File: public/typo3conf/AdditionalConfiguration.php
This file contains the relevant settings for the according environment.
IMPORTANT: Do NOT put any access data or enycryption keys into versioning that are relevant for the live environment.
These are ONLY to be put into LocalConfiguation.php
on production and stage respectively!!!
How to deploy
For the deployment you need a branch with the same name as the deployment-step you want to execute.
Examples:
- If you want to deploy into the staging-enviroment you have to push everything to the
staging
-branch. - If you want to deploy into the production-enviroment you have to push everything to the
production
-branch.
You also need a deployment script with the same name as the branch you want to deploy, e.g ./.surf/Staging.php
for staging
-branch.
Beyond that it is necessary to create a corresponding credential file in .surf/Credentials
. Use the example above as template.
Before you deploy
In case there are any uncommitted changes, please commit them in the corresponding repository to prevent losing them when calling composer throughout the deployment process.
In case you may need a new extension, please don't forget to publish it on packagist. Otherwise it won't be available to standard composer update process.
-
In order to make your changes effective, the
composer.lock
has to get the new version information. So in your website-repository do a - The new
composer.lock
has to be committed as well. So you need to push the changes of your website-repository before executing a deployment.
The deployment
Do the deployment using the following command from your DocumentRoot.
IMPORTANT: The surf extension requires PHP 7 on the CLI
IMPORTANT: Do NOT run deployment with root
or super-user!!! Always use your local user (e.g. via vagrant ssh
or via ddev ssh
)
IMPORTANT: Please login to the TYPO3 backend of your target installation (Staging, Production, ...), so you may have access to it, even if anything may fail or break during the deployment with .surf.
You can use verbose-output to get more information if something goes wrong:
Important hints
- Make sure PHP APCU is installed
When running with doUpgrade
-
Before running the deployment with
doUpgrade = true
make sure your MySQL-user has the right privileges to execute a mysldump: -
If you have an external server to access, you need to at least install mysql-client
- If you are trying to access an older MySQL-version via MySQL-Client v8+, you should add this line
in your
/etc/mysql/my.cnf
Changes with v10.4.0
-
The symlink-folders in
surf/shared/Data
have changed. Please create the following folders on your target server or move existing folders accoringly. Make sure all permissions on these folders are set to your web-user - If you have been using
\TYPO3\CMS\Core\Cache\Backend\ApcBackend
remove this from yourLocalConfiguation.php
BEFORE upgrading to TYPO3 v10. Otherwise the deployment may not run through. - The extension now uses "public" as web-directory (before it was "web"). Make sure your web-directory and your symlinks on the server are changed accordingly!
All versions of t3-surf with dependencies
typo3/cms-core Version ~10.4.0
typo3/surf Version *
helhum/typo3-console Version *