Agregado el servicio gdhcn-validator-service al stack del nodo
This commit is contained in:
parent
cd43e269ef
commit
f128b6b52f
@ -1,4 +1,4 @@
|
|||||||
BASE_URL=localhost
|
NODO_BASE_URL=localhost
|
||||||
|
|
||||||
# Bus FHIR (base, usado como fallback si no se definen MPI_URL o DOCUMENT_REGISTRY_URL)
|
# Bus FHIR (base, usado como fallback si no se definen MPI_URL o DOCUMENT_REGISTRY_URL)
|
||||||
BUS_URL=http://bus-host:8080
|
BUS_URL=http://bus-host:8080
|
||||||
|
|||||||
@ -37,7 +37,7 @@ const config = {
|
|||||||
// VHL token and document TTL in seconds (default: 7 days).
|
// VHL token and document TTL in seconds (default: 7 days).
|
||||||
ttl: parseInt(process.env.VHL_TOKEN_TTL || '604800', 10),
|
ttl: parseInt(process.env.VHL_TOKEN_TTL || '604800', 10),
|
||||||
},
|
},
|
||||||
baseURL: process.env.BASE_URL || 'http://localhost',
|
baseURL: process.env.NODO_BASE_URL || 'http://localhost',
|
||||||
debug: process.env.BUS_DEBUG === 'true',
|
debug: process.env.BUS_DEBUG === 'true',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -65,7 +65,7 @@ async function fetchIPSBundle(patientId) {
|
|||||||
*/
|
*/
|
||||||
async function issueVHL({ patientId, pin }) {
|
async function issueVHL({ patientId, pin }) {
|
||||||
if (!config.vhl.baseUrl) {
|
if (!config.vhl.baseUrl) {
|
||||||
throw createError(500, 'VHL_BASE_URL is not configured');
|
throw createError(500, 'VHL_NODO_BASEURL is not configured');
|
||||||
}
|
}
|
||||||
|
|
||||||
const bundle = await fetchIPSBundle(patientId);
|
const bundle = await fetchIPSBundle(patientId);
|
||||||
|
|||||||
@ -36,6 +36,44 @@ services:
|
|||||||
retries: 5
|
retries: 5
|
||||||
command: -p 5433
|
command: -p 5433
|
||||||
|
|
||||||
|
gdhcn-validator-service:
|
||||||
|
container_name: gdhcn-validator-service
|
||||||
|
image: createchile/gdhcn-validator_backend:v1.1
|
||||||
|
ports:
|
||||||
|
- 8182:8080
|
||||||
|
secrets:
|
||||||
|
- signature-cert
|
||||||
|
- signature-key
|
||||||
|
- dsc-key
|
||||||
|
environment:
|
||||||
|
- POSTGRES_DB=gdhcn-validator
|
||||||
|
- SERVER_PORT=8080
|
||||||
|
- SPRING_DATASOURCE_URL=jdbc:postgresql://gdhcn-db:5432/gdhcn-validator
|
||||||
|
- SPRING_DATASOURCE_USERNAME=root
|
||||||
|
- SPRING_DATASOURCE_PASSWORD=root
|
||||||
|
- TNG_TLS_PEM=/run/secrets/signature-cert
|
||||||
|
- TNG_TLS_KEY=/run/secrets/signature-key
|
||||||
|
- TNG_DSC_PRIVATEKEY=/run/secrets/dsc-key
|
||||||
|
- TNG_COUNTRY=XJ
|
||||||
|
- TNG_DSC_PRIVATEKEY_KID=I1BAX8FATLs=
|
||||||
|
- GDHCN_BASEURL=${NODO_BASE_URL}/gdhcn
|
||||||
|
networks:
|
||||||
|
- hapi-network
|
||||||
|
volumes:
|
||||||
|
- ./json:/json
|
||||||
|
|
||||||
|
gdhcn-db:
|
||||||
|
image: postgres:16-alpine
|
||||||
|
restart: always
|
||||||
|
volumes:
|
||||||
|
- db-data:/var/lib/postgresql/data
|
||||||
|
networks:
|
||||||
|
- hapi-network
|
||||||
|
environment:
|
||||||
|
- POSTGRES_DB=gdhcn-validator
|
||||||
|
- POSTGRES_USER=root
|
||||||
|
- POSTGRES_PASSWORD=root
|
||||||
|
|
||||||
bus-gateway:
|
bus-gateway:
|
||||||
build:
|
build:
|
||||||
context: ./bus-gateway
|
context: ./bus-gateway
|
||||||
@ -83,9 +121,15 @@ volumes:
|
|||||||
hapi-data:
|
hapi-data:
|
||||||
name: hapi-data
|
name: hapi-data
|
||||||
driver: local
|
driver: local
|
||||||
|
|
||||||
secrets:
|
secrets:
|
||||||
ssl_cert:
|
ssl_cert:
|
||||||
file: ${SSL_CERT_PATH:-./certs/server.crt}
|
file: ${SSL_CERT_PATH:-./certs/server.crt}
|
||||||
ssl_key:
|
ssl_key:
|
||||||
file: ${SSL_KEY_PATH:-./certs/server.key}
|
file: ${SSL_KEY_PATH:-./certs/server.key}
|
||||||
|
signature-cert:
|
||||||
|
file: ${SIGNATURE_CERT_PATH:-./certs/signature.crt}
|
||||||
|
signature-key:
|
||||||
|
file: ${SIGNATURE_KEY_PATH:-./certs/signature.key}
|
||||||
|
dsc-key:
|
||||||
|
file: ${SSL_DCC_KEY_PATH:-./certs/dcc.key}
|
||||||
|
|
||||||
@ -66,6 +66,14 @@ http {
|
|||||||
proxy_read_timeout 90s;
|
proxy_read_timeout 90s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
location /gdhcn/ {
|
||||||
|
proxy_pass http://gdhcn-validator-service:8080;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
proxy_read_timeout 90s;
|
||||||
|
}
|
||||||
# Todo lo demás va a hapi-fhir
|
# Todo lo demás va a hapi-fhir
|
||||||
location / {
|
location / {
|
||||||
proxy_pass http://hapi_fhir;
|
proxy_pass http://hapi_fhir;
|
||||||
|
|||||||
@ -82,6 +82,15 @@ http {
|
|||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
proxy_read_timeout 90s;
|
proxy_read_timeout 90s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
location /gdhcn/ {
|
||||||
|
proxy_pass http://gdhcn-validator-service:8080;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
proxy_read_timeout 90s;
|
||||||
|
}
|
||||||
# Todo lo demás va a hapi-fhir
|
# Todo lo demás va a hapi-fhir
|
||||||
location / {
|
location / {
|
||||||
proxy_pass http://hapi_fhir;
|
proxy_pass http://hapi_fhir;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user