generated from cfpb/open-source-project-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
342 set permissions or owner on src in dockerfile (#343)
Closes #342
- Loading branch information
Showing
2 changed files
with
12 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,25 @@ | ||
FROM ghcr.io/cfpb/regtech/sbl/python-alpine:3.12 | ||
|
||
ENV UVICORN_LOG_LEVEL=info | ||
|
||
WORKDIR /usr/app | ||
RUN mkdir reports | ||
RUN mkdir upload | ||
RUN pip install poetry | ||
|
||
COPY poetry.lock pyproject.toml alembic.ini README.md ./ | ||
|
||
COPY ./src ./src | ||
COPY ./db_revisions ./db_revisions | ||
COPY --chown=sbl:sbl poetry.lock pyproject.toml alembic.ini README.md ./ | ||
|
||
RUN poetry config virtualenvs.create false | ||
RUN poetry install --only main | ||
RUN poetry install --only main --no-root | ||
|
||
COPY --chown=sbl:sbl ./src ./src | ||
COPY --chown=sbl:sbl ./db_revisions ./db_revisions | ||
|
||
RUN chmod -R 447 /usr/app/upload | ||
|
||
WORKDIR /usr/app/src | ||
|
||
EXPOSE 8888 | ||
|
||
USER sbl | ||
|
||
CMD ["python", "sbl_filing_api/main.py"] | ||
CMD uvicorn sbl_filing_api.main:app --host 0.0.0.0 --port 8888 --log-config log-config.yml --log-level $UVICORN_LOG_LEVEL --timeout-keep-alive 65 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters