alan
01/12/2026, 6:11 PM# Single entrypoint
gateway:
image: nginx:alpine
restart: always
depends_on:
medplum-app:
condition: service_healthy
medplum-server:
condition: service_healthy
ports:
- "172.16.1.7:8080:80"
volumes:
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
2. Created nginx config:
server {
listen 80;
server_name _;
# -----------------------------
# Medplum app
# -----------------------------
location / {
proxy_pass http://medplum-app:3000;
# Preserve request context
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Accept-Encoding "";
sub_filter_types text/html text/css application/javascript application/json;
sub_filter_once off;
sub_filter "http://localhost:8103" "http://172.16.1.7:8080";
}
# -----------------------------
# Auth and API routes (Medplum server)
# -----------------------------
location ~ ^/(oauth2|fhir|auth|admin|storage|healthcheck) {
proxy_pass http://medplum-server:8103;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}