-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.python.yml
More file actions
37 lines (36 loc) · 1.09 KB
/
compose.python.yml
File metadata and controls
37 lines (36 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# compose.python.yml — Stack Python completo (los 12 casos)
#
# Un solo contenedor, un solo puerto.
# El dispatcher interno enruta por prefijo de path:
#
# GET http://localhost:8200/ → índice de casos
# GET http://localhost:8200/01/... → caso 01
# GET http://localhost:8200/12/... → caso 12
#
# Los 12 servidores de caso corren como subprocesos internos
# en puertos 9001-9012 que nunca se exponen al host.
#
# Uso:
# docker compose -f compose.python.yml up -d --build
# docker compose -f compose.python.yml down
# docker compose -f compose.python.yml logs -f
services:
python-lab:
build:
context: .
dockerfile: python-dispatcher/Dockerfile
container_name: pdsl-python-lab
ports:
- "8200:8200"
environment:
APP_STACK: Python 3.12
PORT: "8200"
healthcheck:
test: ["CMD-SHELL", "python -c \"import urllib.request; urllib.request.urlopen('http://127.0.0.1:8200/01/health', timeout=3).read()\""]
interval: 15s
timeout: 5s
retries: 5
start_period: 25s
mem_limit: 512m
cpus: 2.0
restart: unless-stopped