chore(docker): update docker compose configuration to use pre-built images

This commit is contained in:
cfngc4594 2025-03-05 15:58:44 +08:00
parent 7ade2f8e90
commit 3e94bf07a6
2 changed files with 66 additions and 12 deletions

63
compose.local.yml Normal file
View File

@ -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

View File

@ -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: