I have a project with a Django backend and an Angular frontend. I've deployed them as two services into Google App Engine Standard and the deploy is successful.
However, when I try to access the backend url this-backend.appspot.com, i get
/bin/sh: 1: exec: gunicorn: not found
I have gunicorn in my requirements file:
gunicorn==19.9.0
I also have defined the entrypoint:
runtime: python37
service: default
entrypoint: gunicorn -b :$PORT thisapp.wsgi
handlers:
- url: /static
static_dir: static
- url: /.*
secure: always
redirect_http_response_code: 301
script: auto
But still get the same error.
I looked into all the same issues on the Stackoverflow, and they were either because of the requirements or the entrypoint which I've defined both of them.
Even when I go to the Stackdriver I can see the gunicorn folders inside the app engine:/:
gunicorn
gunicorn-19.9.0.dist-info
This is the backend cloudbuild.yaml file:
steps:
- name: 'python:3.7'
entrypoint: python3
args: ['-m', 'pip', 'install', '-t', '.', '-r', 'requirements.txt']
- name: 'python:3.7'
entrypoint: python3
args: ['./manage.py', 'collectstatic', '--noinput']
- name: 'gcr.io/cloud-builders/gcloud'
args: ['app', 'deploy', '--version=prod']
I'd really appreciate it if anyone has any solutions or recommendations as I've looked into almost all the same issues on the Internet.
Thanks,
James