feat(docker): update docker-compose commands and add health checks for services
This commit is contained in:
parent
a69f819da4
commit
840cd1e70b
@ -35,7 +35,7 @@ git clone https://github.com/cfngc4594/monaco-editor-lsp-next
|
||||
cd monaco-editor-lsp-next
|
||||
|
||||
# Start containers in detached mode
|
||||
docker compose up -d
|
||||
docker compose up -d --build
|
||||
```
|
||||
|
||||
### 🔧 Manual Setup
|
||||
@ -46,7 +46,7 @@ git clone https://github.com/cfngc4594/monaco-editor-lsp-next
|
||||
cd monaco-editor-lsp-next
|
||||
|
||||
# Start specific containers (lsp-c and lsp-cpp) in detached mode
|
||||
docker compose up -d lsp-c lsp-cpp
|
||||
docker compose up -d --build lsp-c lsp-cpp
|
||||
|
||||
# Install project dependencies using Bun package manager
|
||||
bun install
|
||||
|
33
compose.yml
33
compose.yml
@ -3,25 +3,58 @@ services:
|
||||
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
|
||||
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user