diff --git a/memorystore/redis/gae_standard_deployment/app.yaml b/memorystore/redis/gae_standard_deployment/app.yaml index 644e28c54e5..56c1fbfe582 100644 --- a/memorystore/redis/gae_standard_deployment/app.yaml +++ b/memorystore/redis/gae_standard_deployment/app.yaml @@ -11,7 +11,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # [START memorystore_app_yaml_standard] -runtime: python37 +runtime: python314 entrypoint: gunicorn -b :$PORT main:app # Update with Redis instance details diff --git a/memorystore/redis/gke_deployment/Dockerfile b/memorystore/redis/gke_deployment/Dockerfile index 94ccd7d9766..81eb6dbe254 100644 --- a/memorystore/redis/gke_deployment/Dockerfile +++ b/memorystore/redis/gke_deployment/Dockerfile @@ -12,33 +12,23 @@ # See the License for the specific language governing permissions and # limitations under the License. -# The Google App Engine python runtime is Debian Jessie with Python installed -# and various os-level packages to allow installation of popular Python -# libraries. The source is on github at: -# https://github.com/GoogleCloudPlatform/python-docker -FROM gcr.io/google_appengine/python - -# Create a virtualenv for the application dependencies. -# If you want to use Python 2, add the -p python2.7 flag. -RUN virtualenv -p python3.4 /env - -# Set virtualenv environment variables. This is equivalent to running -# source /env/bin/activate. This ensures the application is executed within -# the context of the virtualenv and will have access to its dependencies. -ENV VIRTUAL_ENV /env -ENV PATH /env/bin:$PATH +# Use the official lightweight Python image. +# https://hub.docker.com/_/python +FROM python:3.14-slim # Note: REDISHOST value here is only used for local testing # See README.md on how to inject environment variable as ConfigMap on GKE ENV REDISHOST 127.0.0.1 ENV REDISPORT 6379 +ENV APP_HOME /app +WORKDIR $APP_HOME + # Install dependencies. -ADD requirements.txt /app/requirements.txt -RUN pip install -r /app/requirements.txt +COPY requirements.txt ./ +RUN pip install --no-cache-dir -r requirements.txt # Add application code. -ADD . /app +COPY . ./ CMD ["gunicorn", "-b", "0.0.0.0:8080", "main:app"] -