Skip to content

Commit 920feff

Browse files
committed
Image proxy, listen on $PORT
1 parent 35f01fb commit 920feff

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

pkg/image_proxy/lib/image_proxy_service.dart

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,12 @@ void main(List<String> args) async {
311311
final server = await serve(
312312
handler,
313313
InternetAddress.anyIPv6,
314-
int.tryParse(Platform.environment['IMAGE_PROXY_PORT'] ?? '') ?? 80,
314+
int.tryParse(
315+
Platform.environment['IMAGE_PROXY_PORT'] ??
316+
Platform.environment['PORT'] ??
317+
'',
318+
) ??
319+
8080,
315320
);
316321
print('Serving image proxy on ${server.address}:${server.port}');
317322
}

tool/build_image_proxy.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ steps:
3838
--quiet \
3939
--set-env-vars HMAC_KEY_ID="projects/$PROJECT_ID/locations/us-central1/keyRings/image-proxy-key-ring/cryptoKeys/image-proxy-mac-key/cryptoKeyVersions/1" \
4040
--service-account="image-proxy@$PROJECT_ID.iam.gserviceaccount.com"
41+
--command=""
4142
env:
4243
- 'PROJECT_ID=$PROJECT_ID'
4344
- 'TAG_NAME=$TAG_NAME'

0 commit comments

Comments
 (0)