oliverdavies.uk/content/node.2cf41a31-2530-4b4d-98d1-4f8fdf7e546c.yml

80 lines
5.4 KiB
YAML

uuid:
- value: 2cf41a31-2530-4b4d-98d1-4f8fdf7e546c
langcode:
- value: en
type:
- target_id: daily_email
target_type: node_type
target_uuid: 8bde1f2f-eef9-4f2d-ae9c-96921f8193d7
revision_timestamp:
- value: '2025-05-11T09:00:57+00:00'
revision_uid:
- target_type: user
target_uuid: b8966985-d4b2-42a7-a319-2e94ccfbb849
revision_log: { }
status:
- value: true
uid:
- target_type: user
target_uuid: b8966985-d4b2-42a7-a319-2e94ccfbb849
title:
- value: 'To monorepo, or not to monorepo?'
created:
- value: '2022-08-31T00:00:00+00:00'
changed:
- value: '2025-05-11T09:00:57+00:00'
promote:
- value: false
sticky:
- value: false
default_langcode:
- value: true
revision_translation_affected:
- value: true
path:
- alias: /daily/2022/08/31/monorepo-or-not
langcode: en
body:
- value: |
<p>I listened to a podcast episode recently which talked about monorepos - i.e. code repositories that contain multiple project codebases rather than a single repository for each codebase - and this got me thinking about whether I should be using these more.</p>
<p>It's something that I've been trialling recently in my <a href="https://github.com/opdavies/docker-examples">Docker examples</a> and <a href="https://github.com/OliverDaviesLtd/docker-images">Docker images</a> repositories, where one repository contains and builds multiple Docker images.</p>
<p>I'm not suggesting that I put all of my client projects into one repository, but at least combining the different parts of the same project into the same repository.</p>
<p>For example, I'm working for one client on their current Drupal 7 websites whilst developing the new Drupal 9 versions, which are currently in two separate repositories. I'm also developing an embeddable Vue.js application as part of the Drupal 9 website, and using Fractal as a component library. These are also in their own repositories.</p>
<p>Using a monorepo approach, all of these projects would be in the same repository.</p>
<p>I can see advantages to being able to see cross-project changes in the same place - such as an API change in Drupal that needs a update to be made in Vue.js, or vice-versa - rather than needing to look at separate repositories. This could also make versioning easier as everything will be stored and tagged inside the same repository.</p>
<p>Each project has it's own CI pipeline, so it would require some changes where I set a specific pipeline to run only when a directory is changed.</p>
<p>I see how deployments may be tricker if I need to push an update within a directory to another Git repository, which makes me wonder if I'll need to look into using subtree splits to create separate deployment repositories - similar to how the Symfony project has one main repository and then each component split into its own repository.</p>
<p>I'll keep trialling it in my open-source projects and maybe test it with some client projects, but if you have experience with monorepos that you'd like to share, then please reply to this email - I'd love to hear about it.</p>
format: full_html
processed: |
<p>I listened to a podcast episode recently which talked about monorepos - i.e. code repositories that contain multiple project codebases rather than a single repository for each codebase - and this got me thinking about whether I should be using these more.</p>
<p>It's something that I've been trialling recently in my <a href="https://github.com/opdavies/docker-examples">Docker examples</a> and <a href="https://github.com/OliverDaviesLtd/docker-images">Docker images</a> repositories, where one repository contains and builds multiple Docker images.</p>
<p>I'm not suggesting that I put all of my client projects into one repository, but at least combining the different parts of the same project into the same repository.</p>
<p>For example, I'm working for one client on their current Drupal 7 websites whilst developing the new Drupal 9 versions, which are currently in two separate repositories. I'm also developing an embeddable Vue.js application as part of the Drupal 9 website, and using Fractal as a component library. These are also in their own repositories.</p>
<p>Using a monorepo approach, all of these projects would be in the same repository.</p>
<p>I can see advantages to being able to see cross-project changes in the same place - such as an API change in Drupal that needs a update to be made in Vue.js, or vice-versa - rather than needing to look at separate repositories. This could also make versioning easier as everything will be stored and tagged inside the same repository.</p>
<p>Each project has it's own CI pipeline, so it would require some changes where I set a specific pipeline to run only when a directory is changed.</p>
<p>I see how deployments may be tricker if I need to push an update within a directory to another Git repository, which makes me wonder if I'll need to look into using subtree splits to create separate deployment repositories - similar to how the Symfony project has one main repository and then each component split into its own repository.</p>
<p>I'll keep trialling it in my open-source projects and maybe test it with some client projects, but if you have experience with monorepos that you'd like to share, then please reply to this email - I'd love to hear about it.</p>
summary: null
field_daily_email_cta: { }