Issue running docker-compose.full-stack.yml
# dev
m
When using the docker-compose.full-stack.yml, I am seeing an issue with the app failing. It looks like a configuration issue. The app does not load, and the console shows the error Error: Base URL must start with http or https at new rP (client.ts:856:15) at aX (index.tsx:31:19) at index.tsx:80:11 I've tried adding MEDPLUM_BASE_URL environment variable (per docker-entrypoint.sh) and verified that it is correct in the container. The default in that file also appears to be using http://localhost:8103 per the .env. Looking at the source, I can only guess that the variable is not being set prior to the check, so this may be a defect. As I am new to medplum I thought I'd check here before filing a bug. Thanks!
f
Hi @mornjohgan , I will take a look. Thanks for reporting
Are you running it directly in the repo or copying it to a new location. This file was changed recently, so could it be that you are not using the latest version? I am happy to hop on a call to troubleshoot
m
I am running the docker-compose directly from the repo. I did pull both the repo and update the docker container within the last hour. Thanks for the offer but I am AFK now. I will double check everything over the next day or so, and update this thread.
f
Ok sounds good
m
I finally got back to this today, and I see a different issue after tearing down, pulling the source, and standing the containers back up. This morning, the app is working. However, all calls are going to api.medplum.com from the local containerized instance of the app, instead of the local containerized service. Setting a MEDPLUM_BASE_URL env variable in the app container still seems to have no effect.
f
Are you using
Copy code
curl https://raw.githubusercontent.com/medplum/medplum/refs/heads/main/docker-compose.full-stack.yml > docker-compose.yml
?
m
I have the repo cloned locally and am using docker compose -f ./docker-compose.full-stack.yml up directly from the main branch of the repo, so I would expect it to effectively be the same.
As a sanity check, I just pulled to docker compose with a curl statement and had the same results.
This makes some sense; in the code base api.medplum.com is set as the default base url in core, and I do not see anything overriding it in the docker compose yml for the app container.
That said, based on the entrypoint script I would expect adding a MEDPLUM_BASE_URL environment variable containing http://localhost:8103/ to resolve it. However it does not.
f
OK gotcha. And where are you adding the MEDPLUM_BASE_URL environment of http://localhost:8103/?
m
As an environment variable in the app container.
Via the docker compose. Though looking at the app code I'm wondering if that only works for running in vite but not in nginx.
f
Ohh, hm did you try running it with vite?
m
I did not. However, a few minutes ago I forced a repull of the containers and it looks like it is working now. I haven't checked for relevant changes in the source yet, so I have no idea what may have fixed it.
As far as running with vite. I suppose my initial tests running locally would have been running in vite. That did work to point to my local dockerized server and is what initially led me to think I could add the environment variable to the container.
f
Ok, glad to hear that it is now working!