diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..851276d --- /dev/null +++ b/Dockerfile @@ -0,0 +1,16 @@ +# 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 + +WORKDIR /rem + +COPY main.py /rem/main.py +COPY templates /rem/templates +COPY README.md /rem/README.md +COPY requirements.txt /rem/requirements.txt +COPY readme_tool /rem/readme_tool +COPY setup.py /rem/setup.py +COPY nginx_config.json /docker-entrypoint.d/config.json +COPY . /rem +RUN chmod 775 intake.json +RUN python setup.py develop diff --git a/nginx_config.json b/nginx_config.json new file mode 100644 index 0000000..8710815 --- /dev/null +++ b/nginx_config.json @@ -0,0 +1,17 @@ +{ + "listeners": { + "*:8000": { + "pass": "applications/fastapi" + } + }, + + "applications": { + "fastapi": { + "type": "python 3.9", + "path": "/rem", + "home": "/usr/local", + "module": "main", + "callable": "app" + } + } +}