diff --git a/containers/mmm5-tax-day-compose.yaml b/containers/mmm5-tax-day-compose.yaml index b1ace0b..38bd87b 100644 --- a/containers/mmm5-tax-day-compose.yaml +++ b/containers/mmm5-tax-day-compose.yaml @@ -24,10 +24,12 @@ services: gsas-ui: image: ghcr.io/maffettone/bluesky-adaptive-ui:latest - command: python3 /src/bluesky-adaptive-ui/bluesky_adaptive_ui/default_dash_app/app.py --agent-address gsas + entrypoint: /modify_dns.sh + command: python3 /src/bluesky-adaptive-ui/bluesky_adaptive_ui/default_dash_app/app.py --agent-address gsas-agent --agent-port 8000 environment: - DASH_REQUEST_PATHNAME_PREFIX="/gsas/" volumes: + - ./modify_dns.sh:/modify_dns.sh - type: bind source: ../../bluesky-adaptive-ui target: /src/bluesky-adaptive-ui @@ -71,7 +73,7 @@ services: target: /var/www/html read_only: true depends_on: - gsas: + gsas-agent: condition: service_started gsas-ui: condition: service_started diff --git a/containers/modify_dns.sh b/containers/modify_dns.sh new file mode 100755 index 0000000..2358694 --- /dev/null +++ b/containers/modify_dns.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +# Extract the first nameserver entry +nameserver=$(grep -m 1 'nameserver' /etc/resolv.conf) + +# Recreate resolv.conf with the desired content +{ + echo "search dns.podman" + echo "$nameserver" +} > /etc/resolv.conf + +# Execute the original CMD passed to the script +exec "$@" diff --git a/containers/nginx/locs.d/kmeans-gsas.conf b/containers/nginx/locs.d/kmeans-gsas.conf index daefb96..a83d763 100644 --- a/containers/nginx/locs.d/kmeans-gsas.conf +++ b/containers/nginx/locs.d/kmeans-gsas.conf @@ -1,5 +1,5 @@ location /kmeans-gsas-agent/ { - proxy_pass http://kmeans-gsas:8000/; + proxy_pass http://kmeans-gsas-agent:8000/; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;