@@ -3,9 +3,16 @@ title: "Lifecycle"
3
3
description : " Learn about the workspace lifecycle."
4
4
---
5
5
6
- Workspaces are designed to sustain scheduled shutdowns and rebuilds. An
7
- workspace lifecycle resilient to stops and starts means you can save dollars on
8
- cloud compute and justify more powerful dev machines :).
6
+ A Coder workspace is designed to shutdown (triggered by either scheduled
7
+ workspace inactivity or manually by users and administrators) and be rebuilt.
8
+
9
+ The persistent volume claim (or ` /home/<username> ` ) mounted to the workspace
10
+ ensures that the workspaces retain cloned code repositories and other
11
+ personalization settings.
12
+
13
+ You can manage a Coder workspace's lifecycle at the organization-level to auto
14
+ shutdown after a defined period of inactivity or when administrators want to
15
+ force workspace rebuilds.
9
16
10
17
## Rebuilds
11
18
@@ -19,6 +26,13 @@ even if the underlying [image](../images/index.md) or its dependencies change.
19
26
** Note:** ` username ` is defined in the image. See
20
27
[ Docker's image documentation] ( https://docs.docker.com/engine/reference/builder/#user )
21
28
29
+ ## Auto-start
30
+
31
+ Users can configure a workspace
32
+ [ auto-start] ( https://coder.com/docs/coder/latest/workspaces/autostart ) time,
33
+ which sets the time when Coder will rebuild and start their workspaces. Users
34
+ typically set this time to coincide with the start of their working day.
35
+
22
36
## Auto-off
23
37
24
38
Organizations can set an
@@ -38,11 +52,19 @@ available and running on an underlying host, the following steps are taken:
38
52
a Git provider, your SSH key pair is injected during this step as well,
39
53
allowing it to perform authenticated ` git ` operations.
40
54
41
- 1 . ** Execution of ` /coder/configure ` ** : Execution of this script allows
42
- [ images] ( ../images/index.md ) to perform startup operations consistent across
43
- all of the workspaces that use the image. If you need your image to include
44
- modifications to ` /home ` , include the instructions in this script.
55
+ 1 . ** Execution of ` /coder/configure ` ** : Execution of this script, which is
56
+ included in the workspace image, allows [ images] ( ../images/index.md ) to
57
+ perform startup operations that are consistent across all of the workspaces
58
+ that use the image. If you need your image to include modifications to
59
+ ` /home/<user> ` , include the instructions in this script.
60
+
61
+ In other words, the configure script is _ not_ run as the root user but as the
62
+ ` /home/<user> ` , so configurations are stored in ` /home/<user> ` . You may also
63
+ run commands with ` sudo ` , but these changes will not persist in
64
+ ` /home/<user> ` .
45
65
46
- 1 . ** Execution of ~ /personalize`** : Execution of this script allows you to
47
- customize your personal development workspace on each rebuild. Read more on
48
- personalization [ here] ( ./personalization.md ) .
66
+ 1 . ** Execution of ` ~/personalize ` ** : Execution of this script allows you to
67
+ customize your personal development workspace on each rebuild. Coder injects
68
+ the personalize script into the workspace and includes cloning logic if a
69
+ user has specified a dotfiles repo. Read more on personalization
70
+ [ here] ( ./personalization.md ) .
0 commit comments