|
| 1 | +:navigation-title: GitLab template |
| 2 | + |
| 3 | +.. include:: /Includes.rst.txt |
| 4 | +.. _gitlab-template: |
| 5 | + |
| 6 | +========================================================== |
| 7 | +Creating a TYPO3 project from the official GitLab template |
| 8 | +========================================================== |
| 9 | + |
| 10 | +.. admonition:: Prerequisites |
| 11 | + |
| 12 | + * Knowledge about Git |
| 13 | + * A GitLab account or self-hosted GitLab |
| 14 | + * Planning to do deployment |
| 15 | + * DDEV and Git installed locally |
| 16 | + |
| 17 | +.. _gitlab-template-create: |
| 18 | + |
| 19 | +Create from template |
| 20 | +==================== |
| 21 | + |
| 22 | +Go to page `GitLab - New from template <https://gitlab.com/projects/new#create_from_template>`_ |
| 23 | +or to path `/new#create_from_template` on your self-hosted GitLab. And chose |
| 24 | +:guilabel:`TYPO3 Distribution` from the list: |
| 25 | + |
| 26 | +.. figure:: UseTemplate.png |
| 27 | + :alt: The "TYPO3 Distribution" entry on the "Create from template" page on GitLab. |
| 28 | + |
| 29 | + Click on "Use template" |
| 30 | + |
| 31 | +.. _gitlab-template-create-details: |
| 32 | + |
| 33 | +Fill in project details |
| 34 | +======================= |
| 35 | + |
| 36 | +.. figure:: ProjectDetails.png |
| 37 | + :alt: Detail page when creating a project from a template in GitLab |
| 38 | + |
| 39 | + Fill in the details |
| 40 | + |
| 41 | +.. _gitlab-template-clone: |
| 42 | + |
| 43 | +Clone the project |
| 44 | +================= |
| 45 | + |
| 46 | +Clone the project to your local machine. You can download the SSH link from |
| 47 | +the :guilabel:`Code` dropdown: |
| 48 | + |
| 49 | +.. figure:: GitClone.png |
| 50 | + :alt: Screenshot demonstration the location of the Code button where you can copy the Clone with SSH link |
| 51 | + |
| 52 | + Copy the "Clone with SSH" link |
| 53 | + |
| 54 | +Then clone the repository: |
| 55 | + |
| 56 | +.. code-block:: bash |
| 57 | +
|
| 58 | + git clone [email protected]:linawolf/getting-started-with-the-gitlab-template.git |
| 59 | +
|
| 60 | +.. note:: |
| 61 | + You need an `SSH key (GitLab docu) <https://docs.gitlab.com/user/ssh/>` to |
| 62 | + do this. |
| 63 | + |
| 64 | +.. _gitlab-template-setup: |
| 65 | + |
| 66 | +Start DDEV and setup TYPO3 |
| 67 | +========================== |
| 68 | + |
| 69 | +You can start and setup the project locally in DDEV using the built-in command: |
| 70 | + |
| 71 | +.. code-block:: bash |
| 72 | +
|
| 73 | + ddev typo3-init |
| 74 | +
|
| 75 | +See also file :file:`Readme.md` in the root of your project. |
| 76 | + |
| 77 | + |
| 78 | +This step automatically creates several files that should be added to git: |
| 79 | + |
| 80 | +.. code-block:: bash |
| 81 | +
|
| 82 | + $ git status |
| 83 | + On branch main |
| 84 | + Your branch is up to date with 'origin/main'. |
| 85 | +
|
| 86 | + Untracked files: |
| 87 | + (use "git add <file>..." to include in what will be committed) |
| 88 | + composer.lock |
| 89 | + config/sites/ |
| 90 | + package-lock.json |
| 91 | +
|
| 92 | + nothing added to commit but untracked files present (use "git add" to track) |
| 93 | +
|
| 94 | + $ git add . |
| 95 | +
|
| 96 | + :file:`composer.lock` |
| 97 | + This file contains the information which exact versions of PHP packages |
| 98 | + are installed. |
| 99 | + :file:`package-lock.json` |
| 100 | + This file contains the information which exact versions of npm packages |
| 101 | + are installed. |
| 102 | + :file:`config/sites/` |
| 103 | + Contains configuration and settings of the site that was created during |
| 104 | + setup. |
| 105 | +
|
| 106 | +.. _gitlab-template-login: |
| 107 | + |
| 108 | +Log into the TYPO3 backend |
| 109 | +========================== |
| 110 | + |
| 111 | +If allowed by your system the TYPO3 backend login will be automatically opened |
| 112 | +in a browser. Otherwise you can open a browser of your choice with the |
| 113 | +link displayed in the console. |
| 114 | + |
| 115 | +A default user has been created. Username and password are displayed in your |
| 116 | +console. |
| 117 | + |
| 118 | +.. figure:: Backend.png |
| 119 | + :alt: TYPO3 Backend of a project created with the GitLab Template |
| 120 | + |
| 121 | +Once logged in, you can preview a page and see it rendered with a basic theme. |
| 122 | + |
| 123 | +.. _gitlab-template-directory: |
| 124 | + |
| 125 | +Directory structure of the project |
| 126 | +================================== |
| 127 | + |
| 128 | +.. directory-tree:: |
| 129 | + |
| 130 | + * :path:`.ddev` DDEV configuration |
| 131 | + * :path:`assets` assets for a basic theme that will be built by vite |
| 132 | + * :path:`config` system and site configuration created during setup |
| 133 | + * :path:`node_modules` Managed by npm and vite |
| 134 | + * :path:`packages` |
| 135 | + |
| 136 | + * :path:`site-distribution` basic site package that you can adjust |
| 137 | + |
| 138 | + * :path:`public` webroot of the server |
| 139 | + * :path:`var` you can find the logs and other temporary files here |
| 140 | + * :path:`vendor` all packages are installed here |
| 141 | + * :file:`composer.json` constraints for |
| 142 | + * :file:`composer.lock` contains the information which exact versions |
| 143 | + of PHP packages are installed. |
| 144 | + * :file:`package.json` constraints for frontend libraries |
| 145 | + * :file:`package-lock.json` contains the information which exact versions |
| 146 | + of npm packages are installed. |
| 147 | + * :file:`vite.config.js` predefined vite configuration |
| 148 | + |
0 commit comments