|
| 1 | +--- |
| 2 | +title: "Workspace organization" |
| 3 | +description: Learn how to organize your Coder workspaces. |
| 4 | +--- |
| 5 | + |
| 6 | +This article describes considerations for deciding how to set up your Coder |
| 7 | +workspaces. |
| 8 | + |
| 9 | +In general, the fewer workspaces per developer, the easier it is for the |
| 10 | +individual developer to manage. However, the complexity of the underlying images |
| 11 | +increases as the images need to support multiple projects, each potentially with |
| 12 | +its own language, set of tooling, and dependencies. |
| 13 | + |
| 14 | +Nevertheless, for teams that do not have a complex development workflow, we |
| 15 | +recommend starting with one workspace per developer, since it is the fastest, |
| 16 | +most straightforward model to adopt. |
| 17 | + |
| 18 | +## One workspace per developer |
| 19 | + |
| 20 | +With one workspace per developer, you can think of the Coder workspace the way |
| 21 | +you would a laptop: the workspace is where you have all of your languages, |
| 22 | +dependencies, and tooling installed, and it is the one place you'd go to work on |
| 23 | +your projects. |
| 24 | + |
| 25 | +Benefits: |
| 26 | + |
| 27 | +- Fewer workspaces to manage |
| 28 | +- No need to switch between workspaces for different projects |
| 29 | + |
| 30 | +Potential caveats: |
| 31 | + |
| 32 | +- The size of the workspace can grow quite large |
| 33 | +- The image supporting such a workspace can become complex |
| 34 | + |
| 35 | +## One workspace per architecture |
| 36 | + |
| 37 | +In this situation, you would create one workspace for your JavaScript projects, |
| 38 | +one workspace for your Python projects, and so on. |
| 39 | + |
| 40 | +Benefits: |
| 41 | + |
| 42 | +- Smaller images, since they only contain one language and its dependencies |
| 43 | + |
| 44 | +Potential caveats: |
| 45 | + |
| 46 | +- Developers may have multiple workspaces, consuming more storage space overall |
| 47 | + |
| 48 | +## One workspace per project per developer |
| 49 | + |
| 50 | +Each developer has multiple workspaces, with each workspace devoted to one |
| 51 | +project. If a developer is currently working on three projects, they'd have |
| 52 | +three workspaces. |
| 53 | + |
| 54 | +Benefits: |
| 55 | + |
| 56 | +- Streamlined images with only the languages and dependencies included |
| 57 | +- Smaller, lighter workspaces |
| 58 | + |
| 59 | +Potential caveats: |
| 60 | + |
| 61 | +- As the number of workspaces per developer grows, the importance of |
| 62 | + well-defined dotfiles grow to ensure that developers do not spend too much |
| 63 | + time personalizing their workspaces |
| 64 | + |
| 65 | +### One workspace per major version of the project |
| 66 | + |
| 67 | +A subset of this category is one workspace per **major** version of a project |
| 68 | +(e.g., making major, breaking changes to something). Furthermore, Coder allows |
| 69 | +you to change the underlying image, so you can update the image (changing out |
| 70 | +the language and any dependencies) if needed. |
| 71 | + |
| 72 | +The benefits and potential caveats of this option are similar to those involved |
| 73 | +with setting up one workspace per project per developer. |
| 74 | + |
| 75 | +## One workspace per feature/branch |
| 76 | + |
| 77 | +Setting up one workspace per feature (or branch) allows your developers to focus |
| 78 | +only on that feature. |
| 79 | + |
| 80 | +With dev URLs, allowing access to the work in progress, the workspace could also |
| 81 | +replace the need for any preview builds, while also providing access to some of |
| 82 | +the logs. Reviewers or other developers could push changes to the branch/pull |
| 83 | +request from their own workspaces without needing access to the primary |
| 84 | +developers' workspaces. |
| 85 | + |
| 86 | +## One workspace per commit |
| 87 | + |
| 88 | +We do not recommend creating workspaces on a per-commit basis due to the high |
| 89 | +cost of resources in these situations. |
0 commit comments