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

Entrypoint in app.yaml doesn't work for flexible env on nodejs #456

Open
1 of 7 tasks
toppsdown opened this issue Sep 18, 2024 · 1 comment
Open
1 of 7 tasks

Entrypoint in app.yaml doesn't work for flexible env on nodejs #456

toppsdown opened this issue Sep 18, 2024 · 1 comment
Labels
kind/bug Something isn't working

Comments

@toppsdown
Copy link

toppsdown commented Sep 18, 2024

Describe the bug
The docs here and here show that you can use entrypoint as a setting in app.yaml for flexible environments, but I have not been able to get it to work on nodejs.

Instead of executing the command in the entrypoint, it instead executes npm start, or if not available, will try to execute the index.js in the root of the project.

Additional context
How are you using GCP buildpacks?

  • pack and the gcr.io/buildpacks/builder
  • Cloud Functions
  • Cloud Run
  • Cloud Build
  • App Engine Standard
  • App Engine Flex
  • Firebase App Hosting

Did this used to work?
Unknown

What language is your project primarily written in?
Node.js

Steps To Reproduce
Steps to reproduce the behavior:

  1. setup hello world project
  2. add entrypoint option to app.yaml file with entrypoint: echo "Entry point has executed"
  3. Update npm start in package.json to "start": "echo \"Package.json npm start has executed\"",
  4. Deploy to app engine

Full app.yaml file for reference:

runtime: nodejs
env: flex
entrypoint: echo "Entry point has executed"
runtime_config:
  operating_system: ubuntu22
  runtime_version: 20
automatic_scaling:
  min_num_instances: 1
  max_num_instances: 1

Expected behavior
Expect logs to show "Entry point has executed"

Actual behavior
Logs show Package.json npm start has executed

If applicable, add screenshots / logs / error messages

@toppsdown toppsdown added the kind/bug Something isn't working label Sep 18, 2024
@arthurb4a
Copy link

I have the same issue.
I'm using flexible env with nodejs and it still runs with the "npm start" command.
In my case my entrypoint is
node dist/main.js

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants