Hi There, we're having problems getting our app to function correctly using
a custom runtime and updated health checks. We're using the custom runtime
to add tests + migrations to our deployment. Below are our Dockerfile,
urls.py, and app.yaml. I'm also including a snapshot of the logs Where are
we going wrong? Any suggestions? Note: if we use the standard python
runtime with legacy checks, the app works fine, but no tests/migrations.
Dockerfile
FROM gcr.io/google-appengine/python
# Use python 3 version of GAE base image
LABEL python_version python3.5
RUN virtualenv --no-download /env -p python3.5
ENV VIRTUAL_ENV /env
ENV PATH /env/bin:$PATH
# Install all dependencies in requirements.txt
ADD requirements.txt /app/requirements.txt
RUN pip install -r /app/requirements.txt
# Add the application source code.
ADD . /app
# Run staging migrations then tests. Then run the gunicorn server
WORKDIR /app
EXPOSE 8080
CMD python manage.py migrate --settings app.settings.staging && \
gunicorn -b :8080 app.wsgi
app.yaml
runtime: custom
env: flex
entrypoint: gunicorn -b :8080 app.wsgi
beta_settings:
cloud_sql_instances: CONNECTION
runtime_config:
python_version: 3
automatic_scaling:
min_num_instances: 1
max_num_instances: 1
resources:
cpu: 1
memory_gb: 0.90
disk_size_gb: 10
liveness_check:
path: '/liveness_check'
timeout_sec: 4
check_interval_sec: 30
failure_threshold: 4
success_threshold: 2
initial_delay_sec: 3600
readiness_check:
path: '/readiness_check'
timeout_sec: 4
check_interval_sec: 5
failure_threshold: 2
success_threshold: 2
app_start_timeout_sec: 3600
urls.py
url(r"/readiness_check", lambda r: HttpResponse("OK", status=200)),
url(r"/liveness_check", lambda r: HttpResponse("OK", status=200)),
log
{
httpRequest: {
referer: "-"
remoteIp: "130.211.3.140"
requestMethod: "GET"
requestUrl: "/readiness_check"
responseSize: "3884"
status: 404
userAgent: "GoogleHC/1.0"
}
insertId: "17auvqqf74e9ms"
jsonPayload: {
latencySeconds: "0.009"
time: null
trace: "-"
}
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit
https://groups.google.com/d/msgid/google-appengine/21e53684-a135-4540-aa1c-f5d5e243a287%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.