Skip to content

Instantly share code, notes, and snippets.

View bpmct's full-sized avatar
🥝

Ben Potter bpmct

🥝
View GitHub Profile

Coder added jq to the base image to support mounting secrets from AWS Secrets Manager, or other Kubernetes secrets that are in JSON format. Example:

# Helm values.yaml
coder:
  command:
    - /bin/sh
    - -c     - CODER_PG_CONNECTION_URL=postgresql://coder:$(cat /mnt/postgres-pass/secret.json | jq -r .password)@coder-db.coder.svc.cluster.local:5432/coder /opt/coder server
  volumes:
 - name: "postgres-pass"
#!/bin/bash
# This has been tested on the aws-linux Coder template, which runs Ubuntu Focal
# Check if LXDE is installed
if ! dpkg -s lxde &> /dev/null; then
sudo apt-get update
DEBIAN_FRONTEND=noninteractive sudo apt-get install -y lxde
else
echo "LXDE is already installed."
@bpmct
bpmct / j
Created December 24, 2021 20:47
https://835d-107-77-230-58.ngrok.io/
https://bafd-107-77-230-58.ngrok.io
https://7c15-107-77-230-58.ngrok.io
{
"uuid": "999",
"page": {
"id": 999,
"data": {
"appState": "[\"~#iR\",[\"^ \",\"n\",\"appTemplate\",\"v\",[\"^ \",\"isFetching\",false,\"plugins\",[\"~#iOM\",[\"moduleContainer\",[\"^0\",[\"^ \",\"n\",\"pluginTemplate\",\"v\",[\"^ \",\"id\",\"moduleContainer\",\"type\",\"widget\",\"subtype\",\"ModuleContainerWidget\",\"resourceName\",\"\",\"resourceDisplayName\",null,\"template\",[\"^3\",[\"heightType\",\"fixed\",\"spinWhenChildrenAreFetching\",true,\"showBorder\",true,\"showDropShadow\",true,\"isGlobalWidgetContainer\",true,\"style\",[\"^3\",[]],\"backgroundColor\",\"white\",\"title\",\"\",\"overflowType\",\"hidden\",\"disabled\",\"\"]],\"style\",[\"^3\",[]],\"position2\",[\"^0\",[\"^ \",\"n\",\"position2\",\"v\",[\"^ \",\"container\",\"\",\"rowGroup\",\"body\",\"subcontainer\",\"\",\"row\",0,\"col\",0,\"height\",1.2,\"width\",7,\"tabNum\",0]]],\"mobilePosition2\",[\"^0\",[\"^ \",\"n\",\"position2\",\"v\",[\"^ \",\"^;\",\"\",\"^<\",\"body\",\"^=\",\"\",\"row\",0,\"col\",0,\"^>\",12,\"^?\",

Shared indexes with Coder

TLDR: Shared indexes work with Coder + JetBrains Projector. To quickly prototype your project with shared indexes, you can generate them and host them as a dev URL on your workspace, for other workspaces to try.

After testing, you'll need to upload the contents of /home/coder/indexes/generate-output to a file server and use that as the index location, or include them in the Coder image's filesystem. Dev URLs are used simply as a test. You'll need to regenerate the metadata with cdn-layout-tool with the proper destination as well.

Generating a shared index in a Coder workspace:

Sourced from this tutorial: https://www.jetbrains.com/help/go/shared-indexes.html#configure-index-update