-
Notifications
You must be signed in to change notification settings - Fork 889
chore(examples): Add login_before_ready
and startup_script_timeout
#5880
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
c22917f
260ae3a
22caabb
c8ff74d
f143255
548a941
d9e067e
3bceccc
921e679
f17f45f
f7deb07
8bcfd1c
8bbc0f8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ terraform { | |
} | ||
coder = { | ||
source = "coder/coder" | ||
version = "0.6.6" | ||
version = "0.6.10" | ||
} | ||
} | ||
} | ||
|
@@ -92,15 +92,19 @@ resource "aws_ecs_service" "workspace" { | |
data "coder_workspace" "me" {} | ||
|
||
resource "coder_agent" "coder" { | ||
arch = "amd64" | ||
auth = "token" | ||
os = "linux" | ||
dir = "/home/coder" | ||
startup_script = <<EOT | ||
#!/bin/bash | ||
arch = "amd64" | ||
auth = "token" | ||
os = "linux" | ||
dir = "/home/coder" | ||
|
||
login_before_ready = false | ||
startup_script_timeout = 180 | ||
startup_script = <<-EOT | ||
set -e | ||
|
||
# install and start code-server | ||
curl -fsSL https://code-server.dev/install.sh | sh -s -- --version 4.8.3 | tee code-server-install.log | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removed |
||
code-server --auth none --port 13337 | tee code-server-install.log & | ||
curl -fsSL https://code-server.dev/install.sh | sh -s -- --version 4.8.3 | ||
code-server --auth none --port 13337 >/tmp/code-server.log 2>&1 & | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Redirecting both stdout and stderr for log. Could also use |
||
EOT | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed all shebangs because I didn't want users to get the wrong idea that we obey the shebang. In unix, we should run script via
/bin/bash
if it has this header, but we don't. Likewise for#!/bin/sh
we should use/bin/sh
, but we don't.