From 3e94bf07a6261913e6ed3ece23fdceb71e1de4fc Mon Sep 17 00:00:00 2001 From: cfngc4594 Date: Wed, 5 Mar 2025 15:58:44 +0800 Subject: [PATCH] chore(docker): update docker compose configuration to use pre-built images --- compose.local.yml | 63 +++++++++++++++++++++++++++++++++++++++++++++++ compose.yml | 15 +++-------- 2 files changed, 66 insertions(+), 12 deletions(-) create mode 100644 compose.local.yml diff --git a/compose.local.yml b/compose.local.yml new file mode 100644 index 0000000..bb925d2 --- /dev/null +++ b/compose.local.yml @@ -0,0 +1,63 @@ +services: + monaco-editor-lsp-next: + build: + context: ./ + dockerfile: Dockerfile + image: monaco-editor-lsp-next:latest + container_name: monaco-editor-lsp-next + restart: always + ports: + - "3000:3000" + networks: + - monaco-editor-lsp-next + depends_on: + - lsp-c + - lsp-cpp + healthcheck: + test: [ "CMD-SHELL", "curl --fail http://localhost:3000 || exit 1" ] + interval: 10s + timeout: 5s + retries: 5 + start_period: 10s + user: root + volumes: + - /var/run/docker.sock:/var/run/docker.sock + + lsp-c: + build: + context: ./docker/lsp/clangd + dockerfile: Dockerfile + image: lsp-c:latest + container_name: lsp-c + restart: always + ports: + - "4594:3000" + networks: + - monaco-editor-lsp-next + healthcheck: + test: [ "CMD-SHELL", "nc -zv localhost 3000" ] + interval: 10s + timeout: 5s + retries: 5 + + lsp-cpp: + build: + context: ./docker/lsp/clangd + dockerfile: Dockerfile + image: lsp-cpp:latest + container_name: lsp-cpp + restart: always + ports: + - "4595:3000" + networks: + - monaco-editor-lsp-next + healthcheck: + test: [ "CMD-SHELL", "nc -zv localhost 3000" ] + interval: 10s + timeout: 5s + retries: 5 + +networks: + monaco-editor-lsp-next: + name: monaco-editor-lsp-next + driver: bridge diff --git a/compose.yml b/compose.yml index bb925d2..aeaeca0 100644 --- a/compose.yml +++ b/compose.yml @@ -1,9 +1,6 @@ services: monaco-editor-lsp-next: - build: - context: ./ - dockerfile: Dockerfile - image: monaco-editor-lsp-next:latest + image: cfngc4594/monaco-editor-lsp-next:latest container_name: monaco-editor-lsp-next restart: always ports: @@ -24,10 +21,7 @@ services: - /var/run/docker.sock:/var/run/docker.sock lsp-c: - build: - context: ./docker/lsp/clangd - dockerfile: Dockerfile - image: lsp-c:latest + image: cfngc4594/lsp-c:latest container_name: lsp-c restart: always ports: @@ -41,10 +35,7 @@ services: retries: 5 lsp-cpp: - build: - context: ./docker/lsp/clangd - dockerfile: Dockerfile - image: lsp-cpp:latest + image: cfngc4594/lsp-cpp:latest container_name: lsp-cpp restart: always ports: