Skip to content

Commit

Permalink
set volume directory
Browse files Browse the repository at this point in the history
  • Loading branch information
mesudip committed Aug 5, 2023
1 parent b36a36f commit a3fb0d9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 4 additions & 1 deletion delta-pdf-api/.dockerignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
venv
venv
certs
data
cardano
5 changes: 2 additions & 3 deletions delta-pdf-api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,18 @@ RUN apt-get update && \


# We create home folder for non-root user.
RUN useradd -u 1001 -U -d /server -m app
RUN useradd -u 1001 -U -d /server -m app && mkdir /var/lib/deltapdf && chown 1001:1001 /var/lib/deltapdf
WORKDIR /server
ENV PATH="$PATH:/server/.local/bin"
USER app

COPY ./requirements.txt ./requirements.txt
COPY ./data/s3 ./data/s3

# install all the packages with cache disabled. (this layer will be cached unless requirements.txt is changed.)
RUN pip install --no-cache-dir -r requirements.txt

# Copy the code
COPY ./ ./

VOLUME [ "/var/lib/deltapdf" ]
EXPOSE 8000
CMD [ "uvicorn", "--proxy-headers", "--forwarded-allow-ips=*", "main:app", "--host", "0.0.0.0", "--port", "8000" ]

0 comments on commit a3fb0d9

Please sign in to comment.