Skip to content

Commit eb9e60a

Browse files
author
Matthew Fisher
committed
fix(setup-envdir): write only host if port == 80
If you add port 80 to the end of the endpoint_url, boto3 freaks out. God I hate boto3 some days.
1 parent 16d1362 commit eb9e60a

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

rootfs/docker-entrypoint-initdb.d/001_setup_envdir.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,13 @@ if [ "$DATABASE_STORAGE" == "s3" ]; then
1616
else
1717
# these only need to be set if we're not accessing S3 (boto will figure this out)
1818
echo "http://$DEIS_MINIO_SERVICE_HOST:$DEIS_MINIO_SERVICE_PORT" > WALE_S3_ENDPOINT
19-
echo "http://$DEIS_MINIO_SERVICE_HOST:$DEIS_MINIO_SERVICE_PORT" > S3_URL
19+
if [ "$DEIS_MINIO_SERVICE_PORT" == "80" ]; then
20+
# If you add port 80 to the end of the endpoint_url, boto3 freaks out.
21+
# God I hate boto3 some days.
22+
echo "http://$DEIS_MINIO_SERVICE_HOST" > S3_URL
23+
else
24+
echo "http://$DEIS_MINIO_SERVICE_HOST:$DEIS_MINIO_SERVICE_PORT" > S3_URL
25+
fi
2026
fi
2127

2228
echo $AWS_ACCESS_KEY_ID > AWS_ACCESS_KEY_ID

0 commit comments

Comments
 (0)