Skip to content

Commit c90fdfb

Browse files
committed
Merge branch 'main' into tls
2 parents 8ee7ad1 + 565b940 commit c90fdfb

File tree

4 files changed

+15
-14
lines changed

4 files changed

+15
-14
lines changed

.github/workflows/coder.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,7 @@ jobs:
337337
gcloud config set compute/zone us-central1-a
338338
gcloud compute scp ./dist/coder_*_linux_amd64.deb coder:/tmp/coder.deb
339339
gcloud compute ssh coder -- sudo dpkg -i /tmp/coder.deb
340+
gcloud compute ssh coder -- sudo systemctl daemon-reload
340341
341342
- name: Start
342343
run: gcloud compute ssh coder -- sudo service coder restart

cli/start.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -313,42 +313,42 @@ func start() *cobra.Command {
313313
if defaultAddress == "" {
314314
defaultAddress = "127.0.0.1:3000"
315315
}
316-
root.Flags().StringVarP(&accessURL, "access-url", "", os.Getenv("CODER_ACCESS_URL"), "Specifies the external URL to access Coder.")
317-
root.Flags().StringVarP(&address, "address", "a", defaultAddress, "The address to serve the API and dashboard.")
316+
root.Flags().StringVarP(&accessURL, "access-url", "", os.Getenv("CODER_ACCESS_URL"), "Specifies the external URL to access Coder (uses $CODER_ACCESS_URL).")
317+
root.Flags().StringVarP(&address, "address", "a", defaultAddress, "The address to serve the API and dashboard (uses $CODER_ADDRESS).")
318318
defaultDev, _ := strconv.ParseBool(os.Getenv("CODER_DEV_MODE"))
319-
root.Flags().BoolVarP(&dev, "dev", "", defaultDev, "Serve Coder in dev mode for tinkering.")
319+
root.Flags().BoolVarP(&dev, "dev", "", defaultDev, "Serve Coder in dev mode for tinkering (uses $CODER_DEV_MODE).")
320320
root.Flags().StringVarP(&postgresURL, "postgres-url", "", "",
321321
"URL of a PostgreSQL database to connect to (defaults to $CODER_PG_CONNECTION_URL).")
322322
root.Flags().Uint8VarP(&provisionerDaemonCount, "provisioner-daemons", "", 1, "The amount of provisioner daemons to create on start.")
323323
defaultTLSEnable, _ := strconv.ParseBool(os.Getenv("CODER_TLS_ENABLE"))
324-
root.Flags().BoolVarP(&tlsEnable, "tls-enable", "", defaultTLSEnable, "Specifies if TLS will be enabled.")
324+
root.Flags().BoolVarP(&tlsEnable, "tls-enable", "", defaultTLSEnable, "Specifies if TLS will be enabled (uses $CODER_TLS_ENABLE).")
325325
root.Flags().StringVarP(&tlsCertFile, "tls-cert-file", "", os.Getenv("CODER_TLS_CERT_FILE"),
326326
"Specifies the path to the certificate for TLS. It requires a PEM-encoded file. "+
327327
"To configure the listener to use a CA certificate, concatenate the primary certificate "+
328-
"and the CA certificate together. The primary certificate should appear first in the combined file.")
328+
"and the CA certificate together. The primary certificate should appear first in the combined file (uses $CODER_TLS_CERT_FILE).")
329329
root.Flags().StringVarP(&tlsClientCAFile, "tls-client-ca-file", "", os.Getenv("CODER_TLS_CLIENT_CA_FILE"),
330-
"PEM-encoded Certificate Authority file used for checking the authenticity of client.")
330+
"PEM-encoded Certificate Authority file used for checking the authenticity of client (uses $CODER_TLS_CLIENT_CA_FILE).")
331331
defaultTLSClientAuth := os.Getenv("CODER_TLS_CLIENT_AUTH")
332332
if defaultTLSClientAuth == "" {
333333
defaultTLSClientAuth = "request"
334334
}
335335
root.Flags().StringVarP(&tlsClientAuth, "tls-client-auth", "", defaultTLSClientAuth,
336336
`Specifies the policy the server will follow for TLS Client Authentication. `+
337-
`Accepted values are "none", "request", "require-any", "verify-if-given", or "require-and-verify".`)
337+
`Accepted values are "none", "request", "require-any", "verify-if-given", or "require-and-verify" (uses $CODER_TLS_CLIENT_AUTH).`)
338338
root.Flags().StringVarP(&tlsKeyFile, "tls-key-file", "", os.Getenv("CODER_TLS_KEY_FILE"),
339-
"Specifies the path to the private key for the certificate. It requires a PEM-encoded file.")
339+
"Specifies the path to the private key for the certificate. It requires a PEM-encoded file (uses $CODER_TLS_KEY_FILE).")
340340
defaultTLSMinVersion := os.Getenv("CODER_TLS_MIN_VERSION")
341341
if defaultTLSMinVersion == "" {
342342
defaultTLSMinVersion = "tls12"
343343
}
344344
root.Flags().StringVarP(&tlsMinVersion, "tls-min-version", "", defaultTLSMinVersion,
345-
`Specifies the minimum supported version of TLS. Accepted values are "tls10", "tls11", "tls12" or "tls13".`)
345+
`Specifies the minimum supported version of TLS. Accepted values are "tls10", "tls11", "tls12" or "tls13" (uses $CODER_TLS_MIN_VERSION).`)
346346
defaultTunnelRaw := os.Getenv("CODER_DEV_TUNNEL")
347347
if defaultTunnelRaw == "" {
348348
defaultTunnelRaw = "true"
349349
}
350350
defaultTunnel, _ := strconv.ParseBool(defaultTunnelRaw)
351-
root.Flags().BoolVarP(&useTunnel, "tunnel", "", defaultTunnel, "Serve dev mode through a Cloudflare Tunnel for easy setup.")
351+
root.Flags().BoolVarP(&useTunnel, "tunnel", "", defaultTunnel, "Serve dev mode through a Cloudflare Tunnel for easy setup (uses $CODER_DEV_TUNNEL).")
352352
_ = root.Flags().MarkHidden("tunnel")
353353

354354
return root

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ require (
5858
github.com/manifoldco/promptui v0.9.0
5959
github.com/mattn/go-isatty v0.0.14
6060
github.com/mitchellh/mapstructure v1.4.3
61-
github.com/moby/moby v20.10.13+incompatible
61+
github.com/moby/moby v20.10.14+incompatible
6262
github.com/ory/dockertest/v3 v3.8.1
6363
github.com/pion/datachannel v1.5.2
6464
github.com/pion/logging v0.2.2
@@ -68,7 +68,6 @@ require (
6868
github.com/quasilyte/go-ruleguard/dsl v0.3.19
6969
github.com/rs/zerolog v1.26.1
7070
github.com/spf13/cobra v1.4.0
71-
github.com/spf13/pflag v1.0.5
7271
github.com/stretchr/testify v1.7.1
7372
github.com/tabbed/pqtype v0.1.1
7473
github.com/unrolled/secure v1.10.0
@@ -207,6 +206,7 @@ require (
207206
github.com/spf13/afero v1.8.1 // indirect
208207
github.com/spf13/cast v1.4.1 // indirect
209208
github.com/spf13/jwalterweatherman v1.1.0 // indirect
209+
github.com/spf13/pflag v1.0.5 // indirect
210210
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
211211
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
212212
github.com/xeipuuv/gojsonschema v1.2.0 // indirect

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1263,8 +1263,8 @@ github.com/mitchellh/osext v0.0.0-20151018003038-5e2d6d41470f/go.mod h1:OkQIRizQ
12631263
github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
12641264
github.com/mmcloughlin/avo v0.0.0-20201105074841-5d2f697d268f/go.mod h1:6aKT4zZIrpGqB3RpFU14ByCSSyKY6LfJz4J/JJChHfI=
12651265
github.com/moby/locker v1.0.1/go.mod h1:S7SDdo5zpBK84bzzVlKr2V0hz+7x9hWbYC/kq7oQppc=
1266-
github.com/moby/moby v20.10.13+incompatible h1:EzlPdbJmYtz9QwFkLNvnEF8LoVFddaBzBsJjBH9eMHc=
1267-
github.com/moby/moby v20.10.13+incompatible/go.mod h1:fDXVQ6+S340veQPv35CzDahGBmHsiclFwfEygB/TWMc=
1266+
github.com/moby/moby v20.10.14+incompatible h1:J47P0p+O49F3au8QyE34dE/qXz571kcVmsbx8bvEuS0=
1267+
github.com/moby/moby v20.10.14+incompatible/go.mod h1:fDXVQ6+S340veQPv35CzDahGBmHsiclFwfEygB/TWMc=
12681268
github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c=
12691269
github.com/moby/sys/mountinfo v0.4.0/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A=
12701270
github.com/moby/sys/mountinfo v0.4.1/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A=

0 commit comments

Comments
 (0)