Publish the simulated hospital on the server's address, like a real HIS #4

Open
opened 2026-11-09 10:55:00 -06:00 by edgar · 0 comments
Owner

Goal: a platform deployment reaches the simulated hospital the way it would reach a real one, by address and port, with no Docker network setup.

Description:

compose.prueba.yml publishes the hospital MySQL only on 127.0.0.1:9505. Nothing outside the server reaches it, and neither does a container: inside a container 127.0.0.1 is the container itself. The only way for a platform deployment to read it was to attach its WebApi container to the dev-data-prueba_default network, which is lost on every redeploy and has no counterpart in a hospital install.

In production the connection is made by the WebApi container (the browser sends the connection string; the WebApi opens the SQL connection), to the HIS at an address on the hospital's network. The WebApp proxy plays no part in it.

Change: publish the hospital on the server's network interfaces (${HOSPITAL_DIRECCION:-0.0.0.0}:${HOSPITAL_PUERTO:-9505}:3306), so any deployment connects with

mysql+pymysql://hospital:hospital@<server>:9505/hospital_cacu   (hospital_cama, hospital for TEA)

either by hand in /conectar or through python -m dev_data cargar. HOSPITAL_DIRECCION=127.0.0.1 keeps the old behaviour.

Caveat: the credentials are test ones, in plain sight, and the database is now reachable from the LAN. The data is simulated. A follow-up could give the platform a read-only user with a real password.

Provisional: once the platform keeps its HIS connection (ISSSTELEON/WorkingNarrative#165), DEV deployments use this address as their configured source.

Done when: the standing hospital (dev-data-prueba) listens on the server's address, a deployment on another Docker network reads it by that address, and the docs say how to connect.

**Goal:** a platform deployment reaches the simulated hospital the way it would reach a real one, by address and port, with no Docker network setup. **Description:** `compose.prueba.yml` publishes the hospital MySQL only on `127.0.0.1:9505`. Nothing outside the server reaches it, and neither does a container: inside a container `127.0.0.1` is the container itself. The only way for a platform deployment to read it was to attach its WebApi container to the `dev-data-prueba_default` network, which is lost on every redeploy and has no counterpart in a hospital install. In production the connection is made by the WebApi container (the browser sends the connection string; the WebApi opens the SQL connection), to the HIS at an address on the hospital's network. The WebApp proxy plays no part in it. Change: publish the hospital on the server's network interfaces (`${HOSPITAL_DIRECCION:-0.0.0.0}:${HOSPITAL_PUERTO:-9505}:3306`), so any deployment connects with ``` mysql+pymysql://hospital:hospital@<server>:9505/hospital_cacu (hospital_cama, hospital for TEA) ``` either by hand in `/conectar` or through `python -m dev_data cargar`. `HOSPITAL_DIRECCION=127.0.0.1` keeps the old behaviour. Caveat: the credentials are test ones, in plain sight, and the database is now reachable from the LAN. The data is simulated. A follow-up could give the platform a read-only user with a real password. Provisional: once the platform keeps its HIS connection (ISSSTELEON/WorkingNarrative#165), DEV deployments use this address as their configured source. Done when: the standing hospital (`dev-data-prueba`) listens on the server's address, a deployment on another Docker network reads it by that address, and the docs say how to connect.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: edgar/dev-data#4