Workspace not loading properly
Tried installing both stable and mainline but no change, reinstalling everything, i first thought it was my tunnel over cloudflare, so i disabled it and tried using the tunnel generated by the application, but no success

26 Replies
Im using the scratch template with no changes.
Tried installing both stable and mainline but no change, reinstalling everything, i first thought it was my tunnel over cloudflare, so i disabled it and tried using the tunnel generated by the application, but no success
<#1406044061214707822>
Category
Help needed
Product
Coder (v2)
Platform
Linux
Logs
Please post any relevant logs/error messages.
The scratch template is meant as a starting point, so it doesn't actually do anything, in terms of provisioning compute, by itself
Maybe the docker template is what you're looking for?
So the scratch template does not generate not even a terminal or a vscode web instance?
Even when i add Jetbrains to the template it does not shows up at the workspace menu

It stays like that

terraform {
required_providers {
coder = {
source = "coder/coder"
}
}
}
data "coder_provisioner" "me" {}
data "coder_workspace" "me" {}
resource "coder_agent" "main" {
arch = data.coder_provisioner.me.arch
os = data.coder_provisioner.me.os
metadata {
display_name = "CPU Usage"
key = "0_cpu_usage"
script = "coder stat cpu"
interval = 10
timeout = 1
}
metadata {
display_name = "RAM Usage"
key = "1_ram_usage"
script = "coder stat mem"
interval = 10
timeout = 1
}
}
Use this to set environment variables in your workspace
details: https://registry.terraform.io/providers/coder/coder/latest/docs/resources/env
resource "coder_env" "welcome_message" {
agent_id = coder_agent.main.id
name = "WELCOME_MESSAGE"
value = "Welcome to your Coder workspace!"
}
Adds code-server
See all available modules at https://registry.coder.com/modules
module "code-server" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/coder/code-server/coder"
# This ensures that the latest non-breaking version of the module gets downloaded, you can also pin the module version to prevent breaking changes in production.
version = "~> 1.0"
agent_id = coder_agent.main.id
}
module "jetbrains_gateway" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/coder/jetbrains-gateway/coder"
version = "1.2.2"
agent_id = coder_agent.main.id
folder = "/home/coder/jetbrain"
jetbrains_ides = ["CL", "GO", "IU", "PY", "WS"]
default = "IU"
}
Runs a script at workspace start/stop or on a cron schedule
details: https://registry.terraform.io/providers/coder/coder/latest/docs/resources/script
resource "coder_script" "startup_script" {
agent_id = coder_agent.main.id
display_name = "Startup Script"
script = <<-EOF
#!/bin/sh
set -e
# Run programs at workspace startup
EOF
run_on_start = true
start_blocks_login = true
}
you haven't specified where that compute should exist, i.e. an AWS VM, a Docker container, etc
more specifically, im trying to run coder on a proxmox LXC, no other services included
I thought coder would create an inviroment that i can develop inside
Like a small project
not obligatory on a docker
Coder workspaces create only what you declare in the Terraform template
I'm not really familiar with proxmox LXC, but it looks like there's a Terraform provider for it
do you think its easier to work with docker insted?
We definitely have lots of documentation for creating Docker workspaces on Coder
prolly more than on LXC
but the idea is Coder lets you provision workspaces using any compute you can define in Terraform
I will try, its the first time im using Terraform
the idea is to create a workspace to each of my uni Projects
This is likely super outdated, but I found a template online for provisioning proxmox VMs https://github.com/bpmct/coder-templates/tree/main/proxmox-vm
and to be able to remotely code on a code-server, but i need that each workspace should not see each others files
It sounds like that's seperate from what you're using though?
ohh thankss
Sry, i didnt understant
My advice would be to try and adapt this guide to use a LXC resource instead of a Docker container:
https://registry.terraform.io/providers/Terraform-for-Proxmox/proxmox/latest/docs/resources/lxc
It will require a bit of work on your part to understand the Terraform, sorry we don't have any documentation/guides/existing templates for proxmox LXC
it seems like its trying to create a new LXC to each wokspace
yeah
Coder doesn't have like, a built-in way to containerize workspaces
yeah that's not really my objective with coder because the machine that i use does not have that much RAM, but ill try with the docker part
yeah, its what i thought that Coder did on the first place
No problem, its not a really used OS outside of homelab stuff
but thanks for the help Ethan, ill try using the docker part, if it does not work seems like Coder just isnt my thing