@@ -15,51 +15,73 @@ workspace filesystem.
1515If you'd like to use custom apps in Coder, you can enable this feature in the
1616UI:
1717
18- 1 . In the top-right, click on your avatar and select ** Feature Preview**
19- 1 . Click ** Generic applications** and select ** Enable** .
18+ 1 . In the top-right, click on your avatar and select ** Feature Preview** .
19+ 1 . Click ** Workspace applications** and select ** Enable** .
2020
2121## Application specification file
2222
23- The application specification file allows you to define what Coder needs to
24- launch the application. Within the file, you can specify the following for each
23+ To define custom applications, add a configuration file at
24+ ` /coder/apps/config.yaml ` to your image.
25+
26+ The config file specifies the parameters Coder requires in order to launch the
27+ application. Within the file, you can specify the following for each
2528application:
2629
2730``` yaml
2831# /coder/apps/config.yaml
2932
3033apps :
31- # Name of application in launcher
34+ # Name of application in launcher. Name may consist of alphanumeric
35+ # characters, dashes, underscores. Names must begin with an alphanumeric
36+ # character. Names must be unique per application. Required.
37+ # Regex used "^[a-zA-Z0-9]+[a-zA-Z0-9-_ ]{0,62}$".
3238 - name : projector
33- # Application scheme - must be http or https
39+ # Application scheme - must be http or https. Required.
3440 scheme : http
35- # Application port
41+ # Application port. Required.
3642 port : 9999
37- # Working directory
38- dir : /home/coder
39- # File path to icon used in application launcher
43+ # Host of the application to use when dialing. Defaults to localhost.
44+ # Optional.
45+ host : " localhost"
46+ # Working directory for the start command. Required.
47+ working-directory : /home/coder
48+ # File path to icon used in application launcher. Icons should be either
49+ # PNG, SVG, or JPG. Required.
4050 icon-path : /home/coder/goland.svg
41- # Command to start the application
51+ # Command to start the application. Required.
4252 command : /home/coder/.local/bin/projector
43- # Array of arguments for command
53+ # Array of arguments for command. Optional.
4454 args : ["run"]
45- # Health checks to get running application status
46- # Can use exec or http health checks to localhost
55+ # Health checks to get running application status. Can use exec or http
56+ # health checks to localhost. It is recommended to specify a health-check
57+ # although not strictly required. If one is not supplied then an http
58+ # request is sent to the application root path "/".
4759 health-check :
60+ # Exec commands require an exit code of '0' to report healthy.
4861 exec :
4962 command : " pgrep"
5063 args : ["projector"]
64+ # http sends a GET request to the address specified via the parameters.
65+ # It expects a 200 status code to report healthy.
5166 http :
67+ # Scheme must be "http" or "https". If not specified it inherits
68+ # the application scheme. Optional.
5269 scheme : " http"
53- path : " /"
70+ # The host to use when dialing the address. If not specified it
71+ # inherits the application host. Optional.
72+ host : " localhost"
73+ # Port to use when dialing the application. If not specified it
74+ # inherits the application port. Optional.
5475 port : 9999
76+ # Path to use for the health check. If not specified defaults to
77+ # "/". Optional.
78+ path : " /healthz"
5579` ` `
5680
5781**Notes**:
5882
59- - All top-level fields in the ` config.yaml` file are required
60- - You must include at least one health check. The `exec` health check looks for
61- an exit code of `0`, while the `http` health check looks for the return of
62- ` HTTP 200` .
83+ - A health check _must_ report healthy for you to access the application.
84+ - If you specify both the HTTP and Exec health checks, Coder prioritizes HTTP.
6385
6486You can include the applications specification file in your
6587[workspace image](../images/writing.md). You an also modify the file via
0 commit comments