From 728579800f5675dfe5e9b0f07f168d5cb05def64 Mon Sep 17 00:00:00 2001 From: Trevor Fitzgerald Date: Thu, 6 Mar 2025 00:18:06 -0500 Subject: [PATCH] github codespace devcontainer --- .devcontainer/devcontainer.json | 22 ++++++++++++++-------- conf/mono.Caddyfile | 4 +++- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index f40afde1..ecb27acc 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,11 +1,17 @@ { - "image": "sbtscala/scala-sbt:eclipse-temurin-21.0.6_7_1.10.7_3.6.3", - "customizations": { - "vscode": { - "extensions": [ - "scalameta.metals", - "scala-lang.scala" - ] + "image": "ghcr.io/lichess-org/lila-docker:main", + "portsAttributes": { + "8080": { + "label": "Lichess", + "onAutoForward": "openPreview" } - } + }, + "otherPortsAttributes": { + "onAutoForward": "ignore" + }, + "containerEnv": { + "LILA_DOMAIN": "${localEnv:CODESPACE_NAME}-8080.app.github.dev", + "LILA_URL": "https://${localEnv:CODESPACE_NAME}-8080.app.github.dev" + }, + "postStartCommand": "supervisord -c /etc/supervisor/supervisord.conf" } diff --git a/conf/mono.Caddyfile b/conf/mono.Caddyfile index b8bd49bf..81a23927 100644 --- a/conf/mono.Caddyfile +++ b/conf/mono.Caddyfile @@ -13,4 +13,6 @@ handle_errors 502 { reverse_proxy @websockets :9664 -reverse_proxy :9663 +reverse_proxy :9663 { + header_up Host {$LILA_DOMAIN} +}