-
Notifications
You must be signed in to change notification settings - Fork 7
/
Dockerfile
executable file
·29 lines (22 loc) · 896 Bytes
/
Dockerfile
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
# Use an official lightweight Python image.
# https://hub.docker.com/_/python
FROM python:3.8
#RUN sudo apt-get install libpq-dev python-dev -y
ENV APP_HOME /app
WORKDIR $APP_HOME
# Install dependencies.
COPY requirements.txt .
RUN pip install -r requirements.txt
# Copy local code to the container image.
COPY . .
# Service must listen to $PORT environment variable.
# This default value facilitates local development.
ENV PORT 8080
# Setting this ensures print statements and log messages
# promptly appear in Cloud Logging.
ENV PYTHONUNBUFFERED TRUE
# 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 0.0.0.0:$PORT --workers 4 --threads 8 --timeout 0 tenantscrm.wsgi:application