This repository was archived by the owner on Jan 12, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy pathDockerfile
More file actions
40 lines (31 loc) · 1.25 KB
/
Dockerfile
File metadata and controls
40 lines (31 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
FROM gcr.io/google_appengine/python
# Add the appengine compat library.
COPY appengine-compat /opt/appengine-compat
# Add the vmruntime
COPY appengine-vmruntime /opt/appengine-vmruntime
# Create a virtualenv. This virtualenv will contain the compat library,
# vmruntime, and the user's app's dependencies.
RUN virtualenv /env
ENV VIRTUAL_ENV /env
ENV PATH /env/bin:$PATH
# Install the compat library and the vmruntime.
RUN pip install --upgrade /opt/appengine-compat /opt/appengine-vmruntime
# Install the default WSGI server and dependencies.
COPY resources/requirements.txt /opt/requirements.txt
RUN pip install --upgrade -r /opt/requirements.txt
# Setup the application directory
WORKDIR /app
# Add the default gunicorn configuration file to the app directory. This
# default file will be overridden if the user adds a file called
# "gunicorn.conf.py" to their app's root directory.
ADD resources/gunicorn.conf.py /app/gunicorn.conf.py
# Expose port 8080, the default HTTP traffic port
EXPOSE 8080
# Configure the entrypoint with Managed VMs-essential configuration like "bind",
# but leave the rest up to the config file.
ENTRYPOINT [\
"/env/bin/gunicorn",\
"-b", ":8080",\
"vmruntime.wsgi:meta_app",\
"--log-file=-",\
"-c", "gunicorn.conf.py"]