Publish the simulated hospital on the server's address, like a real HIS #4
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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.ymlpublishes the hospital MySQL only on127.0.0.1:9505. Nothing outside the server reaches it, and neither does a container: inside a container127.0.0.1is the container itself. The only way for a platform deployment to read it was to attach its WebApi container to thedev-data-prueba_defaultnetwork, 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 witheither by hand in
/conectaror throughpython -m dev_data cargar.HOSPITAL_DIRECCION=127.0.0.1keeps 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.