mirror of
https://github.com/massbug/judge4c.git
synced 2025-05-17 23:12:23 +00:00
84 lines
1.7 KiB
YAML
84 lines
1.7 KiB
YAML
services:
|
|
judge4c:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
image: judge4c:latest
|
|
container_name: judge4c
|
|
restart: always
|
|
ports:
|
|
- "3000:3000"
|
|
networks:
|
|
- judge4c
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
lsp-c:
|
|
condition: service_healthy
|
|
lsp-cpp:
|
|
condition: service_healthy
|
|
healthcheck:
|
|
test: [ "CMD-SHELL", "curl --fail http://localhost:3000 || exit 1" ]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
start_period: 10s
|
|
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:
|
|
- judge4c
|
|
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:
|
|
- judge4c
|
|
healthcheck:
|
|
test: [ "CMD-SHELL", "nc -zv localhost 3000" ]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
container_name: postgres
|
|
restart: always
|
|
environment:
|
|
- POSTGRES_USER=${POSTGRES_USER}
|
|
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
|
|
- POSTGRES_DB=${POSTGRES_DB}
|
|
ports:
|
|
- "5432:5432"
|
|
networks:
|
|
- judge4c
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U postgres -d postgres"]
|
|
interval: 5s
|
|
timeout: 2s
|
|
retries: 20
|
|
|
|
networks:
|
|
judge4c:
|
|
name: judge4c
|