Created
November 19, 2019 23:30
-
-
Save grant/ad4771df380fa0efe7f345e2e79cfad9 to your computer and use it in GitHub Desktop.
YouTube API on Cloud Run Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use the official lightweight Python image. | |
# https://hub.docker.com/_/python | |
FROM python:3.7-slim | |
# Copy local code to the container image. | |
ENV APP_HOME /app | |
WORKDIR $APP_HOME | |
COPY . ./ | |
# Install production dependencies. | |
RUN pip install Flask gunicorn python-dotenv google-api-python-client google-auth-oauthlib google-auth-httplib2 | |
# Run the web service on container startup. Here we use the gunicorn | |
# webserver, with one worker process and 8 threads. | |
# For environments with multiple CPU cores, increase the number of workers | |
# to be equal to the cores available. | |
CMD exec gunicorn --bind :$PORT --workers 1 --threads 8 app:app |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment