Creating a TYPO3 project from the official GitLab template

Create from template

Go to page GitLab - New from template or to path /new#create_from_template on your self-hosted GitLab. And chose TYPO3 Distribution from the list:

The "TYPO3 Distribution" entry on the "Create from template" page on GitLab.

Click on "Use template"

Fill in project details

Detail page when creating a project from a template in GitLab

Fill in the details

Clone the project

Clone the project to your local machine. You can download the SSH link from the Code dropdown:

Screenshot demonstration the location of the Code button where you can copy the Clone with SSH link

Copy the "Clone with SSH" link

Then clone the repository:

git clone git@gitlab.com:linawolf/getting-started-with-the-gitlab-template.git
Copied!

Start DDEV and setup TYPO3

You can start and setup the project locally in DDEV using the built-in command:

ddev typo3-init
Copied!

See also file Readme.md in the root of your project.

This step automatically creates several files that should be added to git:

$ git status
On branch main
Your branch is up to date with 'origin/main'.

Untracked files:
  (use "git add <file>..." to include in what will be committed)
        composer.lock
        config/sites/
        package-lock.json

nothing added to commit but untracked files present (use "git add" to track)

$ git add .

:file:`composer.lock`
    This file contains the information which exact versions of PHP packages
    are installed.
:file:`package-lock.json`
    This file contains the information which exact versions of npm packages
    are installed.
:file:`config/sites/`
    Contains configuration and settings of the site that was created during
    setup.
Copied!

Log into the TYPO3 backend

If allowed by your system the TYPO3 backend login will be automatically opened in a browser. Otherwise you can open a browser of your choice with the link displayed in the console.

A default user has been created. Username and password are displayed in your console.

TYPO3 Backend of a project created with the GitLab Template

Once logged in, you can preview a page and see it rendered with a basic theme.

Directory structure of the project

  • .ddev DDEV configuration
  • assets assets for a basic theme that will be built by vite
  • config system and site configuration created during setup
  • node_modules Managed by npm and vite
  • packages

    • site-distribution basic site package that you can adjust
  • public webroot of the server
  • var you can find the logs and other temporary files here
  • vendor all packages are installed here
  • composer.json constraints for
  • composer.lock contains the information which exact versions of PHP packages are installed.
  • package.json constraints for frontend libraries
  • package-lock.json contains the information which exact versions of npm packages are installed.
  • vite.config.js predefined vite configuration