Closed salvolpe closed 3 years ago
The URL path is http://localhost:8080/omoponfhir3/ http://localhost:8080/omoponfhir3/
Please try with this link URL. And, if it does not work, please see if you can talk to the database container from FHIR server container. I think omopv5fhir-psql will not be resolvable inside the omoponfhir3 container unless you set up container network in the docker environment.
On Oct 24, 2020, at 3:18 PM, Salvatore Volpe notifications@github.com wrote:
I just tried setting up an omoponfhir instance on my desktop using the README from this omoponfhir-main and linking it to the smart-postgres SQL database that I forked from the link provided in the README https://github.com/omoponfhir/omopv5fhir-pgsql/. I can get the Tomcat to open at localhost:8080, but http://localhost:8080/omoponfhir throws an Error 404.
Here is what my Dockerfile looks like:
Build the Maven project
FROM maven:3.6.1-alpine as builder COPY . /usr/src/app WORKDIR /usr/src/app RUN mvn clean install
Build the Tomcat container
FROM tomcat:alpine
set environment variables below and uncomment the line. Or, you can manually set your environment on your server.
ENV JDBC_URL=jdbc:postgresql://omopv5fhir-pgsql:5432/smart-postgres?currentSchema=omop_v5 JDBC_USERNAME=smart-postgres JDBC_PASSWORD=i3lworks RUN apk update RUN apk add zip postgresql-client
Copy GT-FHIR war file to webapps.
COPY --from=builder /usr/src/app/omoponfhir-stu3-server/target/omoponfhir-stu3-server.war $CATALINA_HOME/webapps/omoponfhir3.war
EXPOSE 8080 I don't know if I'm not typing something correctly into one of the environment variables or if it's something else. This is my first time working with Docker containers.
Do you have any thoughts?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/omoponfhir/omoponfhir-main/issues/8, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQRHRRFQAZ6RG4TB3AUCITSMMSA7ANCNFSM4S5ZB7KA.
The URL issue was a typo. I actually tried it with http://localhost:8080/omoponfhir3/
and the other prefab URLs and they do not work.
I am completely unfamiliar with Docker. Would you explain in a general sense how I would go about setting up the communication? I have the desktop version and CLI-tools for Docker
Please post here the output of “sudo docker ps -a” here. We can see what you have there and status of docker containers. We can go from there.
On Oct 30, 2020, at 2:11 PM, Salvatore Volpe notifications@github.com wrote:
The URL issue was a typo. I actually tried it with http://localhost:8080/omoponfhir3/ and the other prefab URLs and they do not work.
I am completely unfamiliar with Docker. Would you explain in a general sense how I would go about setting up the communication? I have the desktop version and CLI-tools for Docker
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/omoponfhir/omoponfhir-main/issues/8#issuecomment-719715395, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQRHRWC6P2XARK7VJKKSZTSNL6WPANCNFSM4S5ZB7KA.
Sorry to leave you hanging @myungchoi . I tried to resolve the issue by attaching smart-postgres
to the omoponfhir-main_default
bridge that comes with the installation and that didn't solve the problem. Here is the output of my sudo
call:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ad6ca8813ebd omoponfhir-main_omoponfhir "catalina.sh run" 13 days ago Up 44 hours 0.0.0.0:8080->8080/tcp omoponfhir-main_omoponfhir_1
338cdf426eef smart-postgres:latest "docker-entrypoint.s…" 2 weeks ago Up 10 minutes 0.0.0.0:5432->5432/tcp smart-postgres
2b9724195181 docker/getting-started "/docker-entrypoint.…" 2 weeks ago Exited (0) 13 days ago funny_kirch
In case it is helpful, this is the docker inspection results for the omoponfhir-main_default
network after I connected smart-postgres
to it:
"Name": "omoponfhir-main_default",
"Id": "bfb4d8ede0422a4bd821eecc25d78a89918814c579607a645623f5d5da180c82",
"Created": "2020-10-23T16:48:09.591035052Z",
"Scope": "local",
"Driver": "bridge",
"EnableIPv6": false,
"IPAM": {
"Driver": "default",
"Options": null,
"Config": [
{
"Subnet": "172.19.0.0/16",
"Gateway": "172.19.0.1"
}
]
},
"Internal": false,
"Attachable": true,
"Ingress": false,
"ConfigFrom": {
"Network": ""
},
"ConfigOnly": false,
"Containers": {
"338cdf426eef836e655e3e5284d4052ef457930ca36e52759744bc0006aa4c43": {
"Name": "smart-postgres",
"EndpointID": "375b5b9084dab161b5776efef6237567912211afacf456a2dfb7a8de36d9e9f3",
"MacAddress": "02:42:ac:13:00:03",
"IPv4Address": "172.19.0.3/16",
"IPv6Address": ""
},
"ad6ca8813ebdf2ab8450ced2915c71a5a40ec1fa6ae9d080cc954aa29dd8af3f": {
"Name": "omoponfhir-main_omoponfhir_1",
"EndpointID": "7caaedb082812055540e2425c9b86f3b106ea9cf0ac7231e9671de45eb13fc83",
"MacAddress": "02:42:ac:13:00:02",
"IPv4Address": "172.19.0.2/16",
"IPv6Address": ""
}
},
"Options": {},
"Labels": {
"com.docker.compose.network": "default",
"com.docker.compose.project": "omoponfhir-main",
"com.docker.compose.version": "1.27.4"
}
@myungchoi Any thoughts on these?
This issue has been resolved!
In case anyone else has similar issues with connecting omopv5fhir-pgsql to omoponfhir-main, here is what worked for me:
Your ENV variables in the Dockerfile
for omopfhir-main should be updated as such
ENV JDBC_URL=jdbc:postgresql://smart-postgres:5432/postgres?currentSchema=omop_v5 JDBC_USERNAME=omop_v5 JDBC_PASSWORD=i3lworks
omopv5fhir-pgsql
I just tried setting up an omoponfhir instance on my desktop using the README from this omoponfhir-main and linking it to the smart-postgres SQL database that I forked from the link provided in the README. I can get the Tomcat to open at
localhost:8080
, buthttp://localhost:8080/omoponfhir3
throws an Error 404.Here is what my Dockerfile looks like:
I don't know if I'm not typing something correctly into one of the environment variables or if I have to change things in my
docker-compose.yml
file. I'm not sure. This is my first time working with Docker containers.Do you have any thoughts?