-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bca724c
commit 657c44d
Showing
2 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Use the official lightweight Python image. | ||
# https://hub.docker.com/_/python | ||
FROM python:3.8.1-slim | ||
|
||
# Copy local code to the container image. | ||
ENV APP_HOME /app | ||
WORKDIR $APP_HOME | ||
|
||
#workaround: https://github.com/moby/moby/issues/28617 | ||
ADD .env /app | ||
RUN cat .env >> /etc/environment | ||
|
||
##install required files | ||
|
||
#must run deploy command from folder containing server code | ||
COPY . ./ | ||
|
||
# Install production dependencies. | ||
RUN pip install Flask gunicorn | ||
|
||
# Run the web service on container startup. Here we use the gunicorn | ||
# webserver, with one worker process and 2 threads. | ||
# For environments with multiple CPU cores, increase the number of workers | ||
# to be equal to the cores available. | ||
#to make app:app true, flask server variable name (left side of :) must be app | ||
CMD exec gunicorn --bind :$PORT --workers 1 --threads 2 app:app |
Binary file not shown.