How to run nginx and gunicorn in same docker container

Solution
version: '3.8'
services:
  backend:
    build: . # Dockerfile just installs GUnicorn, CMD starts it
  proxy:
    image: nginx
    volumes:
      - ./nginx-conf:/etc/nginx/conf.d # could build a custom image too
        # configuration specifies `proxy_pass http://backend:8000`
    ports:
      - '8888:80'
# Dockerfile
FROM python:3.9
RUN apt-get update \
 && DEBIAN_FRONTEND=noninteractive
    apt-get install --no-install-recommends --assume-yes \
    python3-dev \
    build-essential
# (don't install irrelevant packages like vim or procps)
WORKDIR /app
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY . .
EXPOSE 8000
# (don't need a shell script wrapper)
CMD gunicorn --bind :8000 --workers 3 wsgi:app