Skip to content

Instantly share code, notes, and snippets.

@Kamparia
Last active January 9, 2021 07:42
Show Gist options
  • Save Kamparia/5e83a5f9e85a4e054dcac55c4967897c to your computer and use it in GitHub Desktop.
Save Kamparia/5e83a5f9e85a4e054dcac55c4967897c to your computer and use it in GitHub Desktop.
MyGeocoder App Dockerfile
# Step 1: Use official lightweight Python image as base OS.
FROM python:3.7-slim
# Step 2. Copy local code to the container image.
ENV APP_HOME /app
WORKDIR $APP_HOME
COPY . ./
# Step 3. Install production dependencies.
RUN pip install -r requirements.txt
# Step 4: Run the web service on container startup using gunicorn webserver.
CMD exec gunicorn --bind :$PORT --workers 1 --worker-class uvicorn.workers.UvicornWorker --threads 8 main:app
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment