From 7579ccec6c5092cad407f23d62f0bb3451990f4f Mon Sep 17 00:00:00 2001 From: synoet Date: Sun, 12 Nov 2023 17:44:26 -0500 Subject: [PATCH] FIX supervisord to run install extension before --- theia-pincer/Dockerfile | 4 +++- theia-pincer/install_extension.sh | 4 ++-- theia-pincer/supervisord.conf | 10 ++++++++++ 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/theia-pincer/Dockerfile b/theia-pincer/Dockerfile index 492a9b4..6bd9009 100644 --- a/theia-pincer/Dockerfile +++ b/theia-pincer/Dockerfile @@ -69,6 +69,8 @@ RUN set -ex; \ chown -R ${USER}:${USER} /home/anubis COPY supervisord.conf /supervisord.conf -COPY install_extension.sh /etc/anubis/init.d/install_extension.sh +COPY install_extension.sh /opt/install_extension.sh + +RUN chmod +x /opt/install_extension.sh USER anubis diff --git a/theia-pincer/install_extension.sh b/theia-pincer/install_extension.sh index b34ef04..c722ab9 100644 --- a/theia-pincer/install_extension.sh +++ b/theia-pincer/install_extension.sh @@ -1,3 +1,3 @@ #! /bin/bash -curl https://pincer-server.fly.dev/version/latest/download -o /opt/code-server/pincer.vsix -code-server --install-extension /opt/code-server/pincer.vsix +curl https://pincer-server.fly.dev/version/latest/download -o /opt/code-server/pincer.vsix +/usr/bin/code-server --user-data-dir=/opt/code-server --install-extension /opt/code-server/pincer.vsix diff --git a/theia-pincer/supervisord.conf b/theia-pincer/supervisord.conf index 209eeb5..4256275 100644 --- a/theia-pincer/supervisord.conf +++ b/theia-pincer/supervisord.conf @@ -2,6 +2,15 @@ logfile=/log/ide.log loglevel=debug +[program:install-extension] +command=/opt/install_extension.sh +priority=1 +directory=/home/anubis +redirect_stderr=true +stdout_logfile=/dev/fd/1 +stdout_logfile_maxbytes=0 +user=anubis + [program:theia] command=/usr/bin/code-server --config /etc/anubis/config.yml --enable-proposed-api synoet.pincer-extension /home/anubis/%(ENV_REPO_NAME)s directory=/home/anubis @@ -10,6 +19,7 @@ user=anubis redirect_stderr=true stdout_logfile=/dev/fd/1 stdout_logfile_maxbytes=0 +priority=10 [program:incluster-init] directory=/home/anubis