Skip to content

Commit 6977b29

Browse files
committed
fix: replace ports in Envoy config correctly
1 parent 9acb1a2 commit 6977b29

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

docker/all-in-one/init/configure-envoy.sh

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/bin/bash
22
set -eou pipefail
33

4+
ENVOY_CDS_CONF=/etc/envoy/cds.yaml
45
ENVOY_LDS_CONF=/etc/envoy/lds.yaml
56
touch /var/log/services/envoy.log
67

@@ -37,9 +38,9 @@ sed -i -e "s|anon_key|$ANON_KEY|g" \
3738
"$ENVOY_LDS_CONF"
3839

3940
# Update Envoy ports
40-
sed -i "s|:80 |:$ENVOY_HTTP_PORT |g" "$ENVOY_LDS_CONF"
41-
sed -i "s|:443 |:$ENVOY_HTTPS_PORT |g" "$ENVOY_LDS_CONF"
42-
sed -i "s|:3000 |:$PGRST_SERVER_PORT |g" "$ENVOY_LDS_CONF"
43-
sed -i "s|:3001 |:$PGRST_ADMIN_SERVER_PORT |g" "$ENVOY_LDS_CONF"
44-
sed -i "s|:8085 |:$ADMIN_API_PORT |g" "$ENVOY_LDS_CONF"
45-
sed -i "s|:9999 |:$GOTRUE_API_PORT |g" "$ENVOY_LDS_CONF"
41+
sed -i "s|port_value: 80$|port_value: $ENVOY_HTTP_PORT|g" "$ENVOY_LDS_CONF"
42+
sed -i "s|port_value: 443$|port_value: $ENVOY_HTTPS_PORT|g" "$ENVOY_LDS_CONF"
43+
sed -i "s|port_value: 3000$|port_value: $PGRST_SERVER_PORT|g" "$ENVOY_CDS_CONF"
44+
sed -i "s|port_value: 3001$|port_value: $PGRST_ADMIN_SERVER_PORT|g" "$ENVOY_CDS_CONF"
45+
sed -i "s|port_value: 8085$|port_value: $ADMIN_API_PORT|g" "$ENVOY_CDS_CONF"
46+
sed -i "s|port_value: 9999$|port_value: $GOTRUE_API_PORT|g" "$ENVOY_CDS_CONF"

0 commit comments

Comments
 (0)