generated from ghga-de/microservice-repository-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update template files * Add initial support for S3 management * Bump version from 1.1.0 -> 1.2.0 * Update debian dockerfile * Move dummy/mock classes into separate module Divide unit tests by type Minor refactoring for documents tests * Add some unit tests for objects management * Add object deletion test * Add catch-all error and tests for unhandled S3 exceptions * Fix test config * Suppress deletion 404 and raise existence check 404 * Add S3 integration tests * Add 'does_bucket_exist' to storage mock Change test bucket names to spinal case Tweak double inequality check * Mongo: raise error in read ops when db or coll not found * Remove commented-out code * Fix dockerfile * Use fastapi.status codes in objects router Fix typos * Add object storage federation with test fixture * Do minor improvement for get_patched_config * Fix some doc strings * Use multi s3 container as context manager
- Loading branch information
1 parent
0d4fb8a
commit 4e5d2ee
Showing
42 changed files
with
2,913 additions
and
813 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
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
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
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
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
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
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 |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# Copyright 2021 - 2024 Universität Tübingen, DKFZ, EMBL, and Universität zu Köln | ||
# for the German Human Genome-Phenome Archive (GHGA) | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
## creating building container | ||
FROM python:3.12-slim-bookworm AS builder | ||
# update and install dependencies | ||
RUN apt update | ||
RUN apt upgrade -y | ||
RUN pip install build | ||
# copy code | ||
COPY . /service | ||
WORKDIR /service | ||
# build wheel | ||
RUN python -m build | ||
|
||
# creating running container | ||
FROM python:3.12-slim-bookworm | ||
# update and install dependencies | ||
RUN apt update | ||
RUN apt upgrade -y | ||
# copy and install requirements and wheel | ||
WORKDIR /service | ||
COPY --from=builder /service/lock/requirements.txt /service | ||
RUN pip install --no-deps -r requirements.txt | ||
RUN rm requirements.txt | ||
COPY --from=builder /service/dist/ /service | ||
RUN pip install --no-deps *.whl | ||
RUN rm *.whl | ||
# create new user and execute as that user | ||
RUN useradd --create-home appuser | ||
WORKDIR /home/appuser | ||
USER appuser | ||
# set environment | ||
ENV PYTHONUNBUFFERED=1 | ||
ENTRYPOINT ["sms"] |
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
Oops, something went wrong.