Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support TYPO3 CMS #570

Closed
rickmanelius opened this issue Dec 11, 2017 · 9 comments
Closed

Support TYPO3 CMS #570

rickmanelius opened this issue Dec 11, 2017 · 9 comments

Comments

@rickmanelius
Copy link
Contributor

What happened (or feature request):

  • Feature Request tied to v1.2.0 of the roadmap.

What you expected to happen:

We've tested and manually stood up a TYPO3 site to get a sense of what would be necessary to make it a supported, 1st class citizen alongside WordPress and Drupal 7/8. Once we refactor how we handle CMS specific logic, we will be using that as a way to officially support TYPO3.

More details and acceptance criteria to follow once we get within 2 sprints of starting this issue.

@rickmanelius
Copy link
Contributor Author

Adding this as a running list of requirements/nice to haves as we attempt to converge on the acceptance criteria necessary for this feature. In an email exchange with @wmdbMattes, he mentioned the following items.

  1. IMPORTANT: ImageMagick / Graphicsmagick binaries accessible for the PHP process (we use exec() calls here).
  2. Somewhat important: Ghostscript compiled into IM/GM
  3. Nice to Haves: pdf2text, pdfinfo, catdoc, ppthtml, unrtf, unzip and xlhtml (for our built-in search)

I was able to confirm that we have ImageMagick installed via apt-get and accessible to PHP exec calls (pass exec ('convert -version'); as a test). We don't have Graphicsmagick, but I'm not sure that is needed in addition to Imagemagick. As for category 2 and 3 items, we don't have Ghostscript or any of the pdf2X converters. We do have unzip.

To provide context as to why these GS and pdf2X libraries are needed/important, @wmdbMattes explained that TYPO3 provides mini-photoshop like set of functionality in the backend to manipulate photos and that requires the ability to support these types of format X to Y conversions.

@rickmanelius
Copy link
Contributor Author

I wanted to call this out explicitly. We've already introduced necessary additions to the web and database containers to pave the way for TYPO3 support. See #500 (comment). So that reduces the number of items in the overall acceptance criteria.

@rickmanelius
Copy link
Contributor Author

@rfay While I have this in the "incubate" state, I'm more than happy to have you spearhead the process of putting in all the details in the issue summary. Otherwise, it's in my queue and will probably get to this by EOW.

@susannemoog
Copy link
Contributor

susannemoog commented Jan 14, 2018

Our idea for setting up TYPO3 with ddev would be the following:

As a user you have a composer.json in your repository, nothing more - for example with this content:

{
    "repositories": [
        {
            "type": "composer",
            "url": "https://composer.typo3.org/"
        }
    ],
    "name": "typo3/ddev-typo3-base-distribution",
    "description": "TYPO3 CMS Base Distribution",
    "license": "GPL-2.0+",
    "require": {
        "typo3/cms-core": "^8.7",
        "typo3/cms-introduction": "^3.0", 
        "typo3-console/composer-auto-setup": "^0.3",
        "helhum/typo3-console": "^5.0",
        "helhum/dotenv-connector": "^2.0"

    },
    "extra": {
        "typo3/cms": {
            "cms-package-dir": "{$vendor-dir}/typo3/cms",
            "web-dir": "public"
        },
        "helhum/dotenv-connector": {
            "env-file": ".env"
        }
    }
}

Executing ddev config, I want to choose type "typo3" which generates the following config:

name: test
type: typo3
docroot: "public"
php_version: "7.1"
webimage: drud/nginx-php-fpm-local:v0.9.0
dbimage: drud/mysql-local-57:v0.6.3
dbaimage: drud/phpmyadmin:v0.2.0
provider: default
hooks:
  post-start:
  - exec: composer install

The docroot folder does not exist but can be read from the extra/typo3-cms/web-dir section from the composer.json. Ideally ddev takes care of reading that value and using it in the config as well as creating the folder. ddev config should also generate a .env.install file with the following content:

TYPO3_INSTALL_DB_PASSWORD="db"
TYPO3_INSTALL_DB_HOST="db"
TYPO3_INSTALL_DB_PORT=3306
TYPO3_INSTALL_DB_USE_EXISTING=true
TYPO3_INSTALL_DB_DBNAME="db"
TYPO3_INSTALL_ADMIN_USER="admin"
TYPO3_INSTALL_ADMIN_PASSWORD="password"
TYPO3_INSTALL_SITE_NAME="TYPO3 on DDEV"

SITE_NAME should be replaced with the project name.

At the moment the TYPO3 itself seems to be running well (with drupal7 presets) - we need to re-check mail sending, but image generation works fine.

@helhum
Copy link

helhum commented Jan 14, 2018

Thanks @psychomieze

I have an extended and cleaned up and working version pushed into a repo

The docroot folder does not exist but can be read from the extra/typo3-cms/web-dir section from the composer.json. Ideally ddev takes care of reading that value and using it in the config as well as creating the folder

Main issue here is, that docroot and working-dir currently is the same for ddev.
That is why I changed docker-compose.yaml accordingly to allow different values.

That however leads to the situation that ddev can't be started if public folder is not there,
so I added the folder to the git repo, although it would be automatically created on composer install

So ideally on ddev config when TYPO3 is selected, the docroot is read from composer.json and the folder is created. The default working dir should be the project dir (dir with .ddev folder).

.env.install file with the following content

That is one option. Here is the complete and fixed contents of such file:

TYPO3_INSTALL_DB_USER="db"
TYPO3_INSTALL_DB_PASSWORD="db"
TYPO3_INSTALL_DB_HOST="db"
TYPO3_INSTALL_DB_PORT="3306"
TYPO3_INSTALL_DB_UNIX_SOCKET=""
TYPO3_INSTALL_DB_USE_EXISTING="1"
TYPO3_INSTALL_DB_DBNAME="db"
TYPO3_INSTALL_ADMIN_USER="admin"
TYPO3_INSTALL_ADMIN_PASSWORD="password
TYPO3_INSTALL_SITE_NAME="TYPO3 (on DDEV)"
TYPO3_INSTALL_SITE_SETUP_TYPE="no"

However I would opt for adding these env vars to docker-compose.yaml directly, which I have done in the repo.

At the moment the TYPO3 itself seems to be running well (with drupal7 presets)

I used plain php preset and this seems to be fine as well

image generation works fine

I can confirm that

we need to re-check mail sending

Mail sending currently does not work, but this seems to be an issue on TYPO3 side not correctly detecting PHP config and failing with mailhog as sendmail command.

@rfay
Copy link
Member

rfay commented Jan 15, 2018

Thanks so much for this great work! We'll take a look and try to understand it shortly.

@rfay rfay removed the incubate label Jan 15, 2018
@helhum
Copy link

helhum commented Jan 15, 2018

We'll take a look and try to understand it shortly

Thanks @rfay. Don't hesitate to ask in case you have any questions. I'd be happy to help out.

@rickmanelius
Copy link
Contributor Author

rickmanelius commented Jan 16, 2018

Explicitly cross posting other items that have been surfaced as high importance. Allowing alternative ports.

@rickmanelius
Copy link
Contributor Author

@helhum and @psychomieze Besides items noted in this thread, the alternative port issue, and other items listed in the #500 thread, are there any other key items as part of a normal/typical TYPO3 workflow that we should be aware of? Thanks again for all the great feedback!

@rfay rfay removed the incubate label Jan 22, 2018
@rfay rfay changed the title Officially Support TYPO3 Support TYPO3 CMS Jan 23, 2018
@rfay rfay closed this as completed in a55178d Jan 29, 2018
@rickmanelius rickmanelius modified the milestones: v1.2.0, v0.12.0 Jan 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants