Skip to content

Instantly share code, notes, and snippets.

@novasush
Created March 7, 2021 17:19
Show Gist options
  • Save novasush/41fdbe67aace97782a0f4e119e1c6611 to your computer and use it in GitHub Desktop.
Save novasush/41fdbe67aace97782a0f4e119e1c6611 to your computer and use it in GitHub Desktop.
Dockerfile for fastapi nginx unit
# Using base image provided by nginx unit
FROM nginx/unit:1.22.0-python3.9
# Alternatively you can use different tags from https://hub.docker.com/r/nginx/unit
COPY requirements.txt /fastapi/requirements.txt
RUN pip install -r /fastapi/requirements.txt
COPY config.json /docker-entrypoint.d/config.json
COPY . /fastapi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment