[google-appengine] Re: App Engine Flexible Environment - Dockerfile installing outdated version of GDAL

2020-04-24 Thread 'Olu' via Google App Engine
Hello,

Thank you for the information shared. I actually observed that it seems you 
posted the same issue on Stackoverflow[1] and one of the GCP Support 
Engineers is assisting you on the Thread. 

Configuring your application to listen on Port 8080, you can simply set a 
PORT environment variable set to 8080. Reviewing the information provided, 
it seems to me like you are simply following steps described in this 
documentation[1] and choosing to point the entrypoint to your WSGI server, 
MyApplication.wsgi using gunicorn for your Django application. As explained 
however, in this documentation[3], there might be other configurations 
required depending on your application in which it is recommended that you 
set up a gunicorn.conf.py file. You can consult this Gunicorn 
documentation[4] for details about available Gunicorn's configuration 
values. 

Also, as advised by the GCP Support engineer on Stackoverflow, I recommend 
that you review the details of this Sample AppEngine Django App on GitHub[5]

[1]https://stackoverflow.com/questions/61390259/app-engine-flexible-environment-dockerfile-installing-outdated-version-of-gdal
[2]https://cloud.google.com/appengine/docs/flexible/python/runtime#application_startup
[3]https://cloud.google.com/appengine/docs/flexible/python/runtime#recommended_gunicorn_configuration
[4]http://docs.gunicorn.org/en/19.3/settings.html
[5]https://github.com/GoogleCloudPlatform/python-docs-samples/tree/master/appengine/flexible/django_cloudsql

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/be23f3f9-5b2e-4098-98dc-da3023c3e33d%40googlegroups.com.


[google-appengine] Re: App Engine Flexible Environment - Dockerfile installing outdated version of GDAL

2020-04-24 Thread j o
This is apparently happening as my app isn't running on port 8080 and App 
Engine is then crashing. How do I make sure that it is running on 8080? 

This is my app.yaml: 

EDIT:

My app.yaml:

# [START django_app] runtime: custom env: flex entrypoint: gunicorn -b :$PORT 
MyApplication.wsgi runtime_config: python_version: 3 # [END runtime] handlers: 
# This configures Google App Engine to serve the files in the app's static # 
directory. #- url: /static # static_dir: static/ #- url: /MyApplication/static 
# static_dir: MyApplication/static/ # This handler routes all requests not 
caught above to your main app. It is # required when static routes are defined, 
but can be omitted (along with # the entire handlers section) when there are no 
static files defined. - url: /.* script: auto # [END django_app] resources: 
cpu: 1 memory_gb: 2 disk_size_gb: 10


On Thursday, 23 April 2020 16:34:29 UTC+1, j o wrote:
>
>  am trying to use a Docker image on Google App Engine Flexible Environment.
>
> FROM ubuntu:bionic
>
>
> ENV PYTHONUNBUFFERED 1
> ENV DEBIAN_FRONTEND noninteractive
> ENV LANG C.UTF-8
>
> RUN apt-get update -qq && apt-get install -y -qq \
> # std libs
> git less nano curl \
> ca-certificates \
> wget build-essential\
> # python basic libs
> python3.8 python3.8-dev python3.8-venv gettext \
> # geodjango
> gdal-bin binutils libproj-dev libgdal-dev \
> # postgresql
> libpq-dev postgresql-client && \
> apt-get clean all && rm -rf /var/apt/lists/* && rm -rf /var/cache/apt/*
>
> # install pip
> RUN wget https://bootstrap.pypa.io/get-pip.py && python3.8 get-pip.py && rm 
> get-pip.py
> RUN pip3 install --no-cache-dir setuptools wheel -U
>
> CMD ["/bin/bash"]
>
>
>
>
> The docker image appears to build correctly but when the service deploys 
> the application crashes and i get this error message:
>
>  File 
> "/Users/NAME/Documents/gcp/google-cloud-sdk/lib/googlecloudsdk/api_lib/app/operations_util.py",
>  line 183, in IsDone encoding.MessageToPyValue(operation.error))) 
> OperationError: Error Response: [9] 
>
> Application startup error! Code: APP_CONTAINER_CRASHED ERROR: 
> (gcloud.app.deploy) Error Response: [9] Application startup error! Code: 
> APP_CONTAINER_CRASHED
>
> This is failing as the Dockerfile is installing a significantly outdated 
> version of the GDAL package which conflicts with the more current python 
> installation.
>
> How do I ensure that the dockerfile has the correct package repository and 
> is installing the right, up to date, versions? Is there some line that I 
> can insert to update the repository, or at least print the repository, 
> before it starts installing?
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/8c5b0d27-17fd-438d-bc1c-7769a7c79898%40googlegroups.com.