Skip to content

chore: add filebrowser to dogfood #8535

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

Merged
merged 9 commits into from
Jul 18, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update main.tf
  • Loading branch information
matifali authored Jul 17, 2023
commit 289a601438fbde75127a43d1d9d00d7b4ef5b423
11 changes: 8 additions & 3 deletions dogfood/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,7 @@ data "coder_workspace" "me" {}
resource "coder_agent" "dev" {
arch = "amd64"
os = "linux"

dir = "/home/coder"
dir = "${data.coder_parameter.repo_dir.value}"
env = {
GITHUB_TOKEN : data.coder_git_auth.github.access_token,
OIDC_TOKEN : data.coder_workspace.me.owner_oidc_access_token,
Expand Down Expand Up @@ -172,6 +171,9 @@ resource "coder_agent" "dev" {
startup_script = <<-EOT
set -eux -o pipefail

# change to home
cd /home/coder

# install and start code-server
curl -fsSL https://code-server.dev/install.sh | sh -s -- --method=standalone --prefix=/tmp/code-server --version 4.8.3
/tmp/code-server/bin/code-server --auth none --port 13337 >/tmp/code-server.log 2>&1 &
Expand All @@ -197,7 +199,10 @@ resource "coder_agent" "dev" {
elif [ -f ~/personalize ]; then
echo "~/personalize is not executable, skipping..." | tee -a ~/.personalize.log
fi

# chnage back to repo_dir
cd ${data.coder_parameter.repo_dir.value}

EOT
}

Expand All @@ -221,7 +226,7 @@ resource "coder_app" "filebrowser" {
agent_id = coder_agent.dev.id
display_name = "File Browser"
slug = "filebrowser"
url = "http://localhost:8080/"
url = "http://localhost:8080"
icon = "https://raw.githubusercontent.com/matifali/logos/main/database.svg"
subdomain = true
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was not able to use it without subdomain=true

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It may be possible, following this approach and I was able to start it on a subpath with a minor issue. (somehow coder repeats app path 2 times)

share = "owner"
Expand Down