Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: dart_frog build -p (specifies port) #1327

Open
1 task
a-wallen opened this issue Mar 28, 2024 · 0 comments
Open
1 task

feat: dart_frog build -p (specifies port) #1327

a-wallen opened this issue Mar 28, 2024 · 0 comments
Labels
feature A new feature or request

Comments

@a-wallen
Copy link

Description

GCP allows sidecar images. The ingress image must handle requests on 8080, so that port is reserved.

My sidecar image needs a liveness probe.

It can't also run on 8080.

So, I want to be able to call dart_frog build -p 8181.

Looks like the main function reads from Platform.environment already.

void main() async {
  final address = InternetAddress.anyIPv6;
  final port = int.tryParse(Platform.environment['PORT'] ?? '8080') ?? 8080;
  createServer(address, port);
}

The easiest solution is for the build command handler to set the PORT variable.

IIUC another solution would be to do it in the Dockerfile.

Another (not preferred IMO) is to modify the generated server.dart code.

Requirements

  • dart_frog build -p <port> runs the server on a port.
@a-wallen a-wallen added the feature A new feature or request label Mar 28, 2024
plato79 added a commit to plato79/dart_frog that referenced this issue Apr 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A new feature or request
Projects
Status: Needs Triage
Development

No branches or pull requests

1 participant