I have successfully setup an Neos installation and now I am trying to edit some content of the Demo project “TYPO3.NeosDemoTypo3Org”.
After a couple of hours doing research I have found “Surf”-deployment to fulfill my needs. So I started to setup a git repository with a couple of files in it. I also have setup a deployment script which is running fine for my testing environment.
Unfortunately I am not able to deploy my local changes to the remote testing environment. I did a “./flow site:export --package-name TYPO3.NeosDemoTypo3Org” for several times, so I can put the Sites.xml in the git repository. Am I missing some files to checkin?
So I want to ask you how to start a successful deployment of my local changes to the Demo project.
Which files are necessary in the git repository, to do a versioning of my local changes?
Which files are necessary in the git repository for a deployment, so my local changes are visible in my testing environment?
to dive more into my setup I will give you a few explanations.
I have setup two identical Neos installations. One local setup (internal self hosted Ubuntu server) and one remote setup (external Ubuntu server with ssh-based access).
On local setup I do all my changes in Neos, e.g. edit some templates, add some packages, add pages and more). These changes I want to deploy to my remote setup, so they are in the exact same state.
I did an installation of the Surf package on my local server and setup the following deployment script.
$node = new Node('production');
$application = new \TYPO3\Surf\Application\TYPO3\Neos();
$workflow = new SimpleWorkflow();
The Surf-Deployment itself runs fine without errors. But unfortunatelly my newly added content from local setup does not exist on remote setup after all.
So my question is, what kind of files do I need to add to my Git-repository, so my edited content and packages will be up on remote machine?
you might want to export your site content into your Git repository, create a new commit and then do a site:import in the Surf deployment. This should update your remote server with the latest content. If you don’t include your site package in your Git repository (so you have a combined repository for your Neos distribution and the site package) you need to export the site into a file:
The Surf Neos application adds a typo3.surf:typo3:neos:importsite task automatically which uses the configured sitePackageKey to import the content. This task doesn’t support the filename argument yet. So what I’d do in that case is to remove the original task and add a typo3.surf:typo3:flow:runcommand task which imports the content from the specific Sites.xml:
Didn’t test that script above but that should be the basic structure you need to use. We should improve the Surf Neos application and the site import task to support that case without customization though. We don’t actually use the Neos application because in production deployments we don’t want a site import to happen. So that should be configurable, too.