mirror of https://github.com/coder/coder.git
fix: correct free disk space reported by agent metadata in fly.io example (#7592)
This commit is contained in:
parent
ec5ef51b49
commit
63a9e34381
|
@ -284,10 +284,11 @@ resource "coder_agent" "main" {
|
||||||
code-server --auth none >/tmp/code-server.log 2>&1 &
|
code-server --auth none >/tmp/code-server.log 2>&1 &
|
||||||
# Set the hostname to the workspace name
|
# Set the hostname to the workspace name
|
||||||
sudo hostname -b "${data.coder_workspace.me.name}-fly"
|
sudo hostname -b "${data.coder_workspace.me.name}-fly"
|
||||||
|
echo "127.0.0.1 ${data.coder_workspace.me.name}-fly" | sudo tee -a /etc/hosts
|
||||||
# Install the Fly CLI and add it to the PATH
|
# Install the Fly CLI and add it to the PATH
|
||||||
curl -L https://fly.io/install.sh | sh
|
curl -L https://fly.io/install.sh | sh
|
||||||
echo "export PATH=$PATH:/home/coder/.fly/bin" >> ~/.bashrc
|
echo "export PATH=$PATH:/home/coder/.fly/bin" >> /home/coder/.bashrc
|
||||||
source ~/.bashrc
|
source /home/coder/.bashrc
|
||||||
EOT
|
EOT
|
||||||
|
|
||||||
metadata {
|
metadata {
|
||||||
|
@ -320,7 +321,7 @@ resource "coder_agent" "main" {
|
||||||
script = <<-EOT
|
script = <<-EOT
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
set -e
|
||||||
df /home/coder | awk '$NF=="/"{printf "%s", $5}'
|
df | awk '$NF=="/home/coder" {printf "%s", $5}'
|
||||||
EOT
|
EOT
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue