diff --git a/.dockerignore b/.dockerignore index cf28bb3c..28f516bf 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,8 +1,6 @@ -.git -.* -!.flake8 -~* -db -docs -dataset -cv2dnn +* +!docker/bin +!docker/conf +!pyproject.toml +!pdm.lock +!src diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f38dc395..f643f682 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,193 +7,130 @@ on: pull_request: branches: - develop +env: + HASH_SEEDS: pdm.lock docker/bin/* docker/conf/* docker/Dockerfile + DOCKER_CACHE_IMAGE: ${{ vars.DOCKERHUB_ORGANIZATION }}/hope-support-images + BUILD_DATE: $(date +"%Y-%m-%d %H:%M") + DOCKER_DEFAULT_PLATFORM: linux/amd64 jobs: - build_and_push_dev: - runs-on: ubuntu-latest - steps: - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - name: Checkout code - uses: actions/checkout@v2 - - name: DockerHub login - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Push dev - run: | - docker buildx create --use - docker buildx build \ - --cache-from ${{ vars.DOCKERHUB_ORGANIZATION }}/hope-support-images:cache-deduplication-engine-${{ github.sha }}-dev \ - --cache-from ${{ vars.DOCKERHUB_ORGANIZATION }}/hope-support-images:cache-deduplication-engine-latest-dev \ - --cache-to ${{ vars.DOCKERHUB_ORGANIZATION }}/hope-support-images:cache-deduplication-engine-${{ github.sha }}-dev \ - --cache-to ${{ vars.DOCKERHUB_ORGANIZATION }}/hope-support-images:cache-deduplication-engine-latest-dev \ - -t ${{ vars.DOCKERHUB_ORGANIZATION }}/hope-support-images:deduplication-engine-${{ github.sha }}-dev \ - -t ${{ vars.DOCKERHUB_ORGANIZATION }}/hope-support-images:deduplication-engine-latest-dev \ - -f ./docker/Dockerfile \ - --target dev \ - --push \ - ./ - - black: - runs-on: ubuntu-latest - needs: [build_and_push_dev] + build: + runs-on: ubuntu-20.04 steps: - name: Checkout code - uses: actions/checkout@v2 - - name: DockerHub login - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Check - run: | - docker run --rm -i \ - ${{ vars.DOCKERHUB_ORGANIZATION }}/hope-support-images:deduplication-engine-${{ github.sha }}-dev \ - black . --check - - flake8: - runs-on: ubuntu-latest - needs: [build_and_push_dev] - steps: - - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: DockerHub login - uses: docker/login-action@v1 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Check + - name: Check Dev Image + continue-on-error: true + id: image_exists run: | - docker run --rm -i \ - ${{ vars.DOCKERHUB_ORGANIZATION }}/hope-support-images:deduplication-engine-${{ github.sha }}-dev \ - flake8 \ - --max-complexity 12 \ - --max-line-length 120 \ - --exclude=.*/,__pycache__,docs,~build,dist,*.md \ - --per-file-ignores='src/**/migrations/*.py:E501' \ - . - - unit_tests: - runs-on: ubuntu-latest - needs: [build_and_push_dev] - steps: - - name: Checkout code - uses: actions/checkout@v2 - - name: DockerHub login - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Unit tests - run: | - backend_image=${{ vars.DOCKERHUB_ORGANIZATION }}/hope-support-images:deduplication-engine-${{ github.sha }}-dev docker compose \ - -f ./ops/compose.ci-test.yml \ - up --exit-code-from backend - - build_and_push_prd: - needs: [build_and_push_dev] - runs-on: ubuntu-latest - steps: - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - name: Checkout code - uses: actions/checkout@v2 - - name: DockerHub login - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Push prd + set +e + LOCK_SHA=$(echo sha1sum ${{env.HASH_SEEDS}}| sha1sum | awk '{print $1}' | cut -c 1-8) + exists=$(docker manifest inspect ${DOCKER_CACHE_IMAGE}:hde-dev-${LOCK_SHA} > /dev/null 2>&1 && echo "exists" || echo "not_found") + exists="exists" + echo "result=$exists" >> "$GITHUB_OUTPUT" + echo "SHA=$LOCK_SHA" >> "$GITHUB_OUTPUT" + if [ $exists = "exists" ];then + echo "Tag ${{ steps.image_exists.outputs.SHA }} found" + else + echo "Tag ${{ steps.image_exists.outputs.SHA }} does not exist" + fi + - name: Build Dev Image + if: ${{ steps.image_exists.outputs.result == 'not_found' || contains(github.event.head_commit.message, 'rebuild') }} run: | - docker buildx create --use - - # Base part of the command - build_command="docker buildx build \ + LOCK_SHA=${{ steps.image_exists.outputs.SHA }} + docker buildx create --use --platform x86_64 --name builder --driver docker-container + docker buildx build \ + --platform x86_64 \ + --builder builder \ + --build-arg BUILD_DATE="${BUILD_DATE}" \ --progress=plain \ - --cache-from ${{ vars.DOCKERHUB_ORGANIZATION }}/hope-support-images:cache-deduplication-engine-${{ github.sha }}-dev \ - --cache-from ${{ vars.DOCKERHUB_ORGANIZATION }}/hope-support-images:cache-deduplication-engine-latest-dev \ - --cache-from ${{ vars.DOCKERHUB_ORGANIZATION }}/hope-support-images:cache-deduplication-engine-${{ github.sha }}-prd \ - --cache-from ${{ vars.DOCKERHUB_ORGANIZATION }}/hope-support-images:cache-deduplication-engine-latest-prd \ - --cache-to ${{ vars.DOCKERHUB_ORGANIZATION }}/hope-support-images:cache-deduplication-engine-${{ github.sha }}-prd \ - --cache-to ${{ vars.DOCKERHUB_ORGANIZATION }}/hope-support-images:cache-deduplication-engine-latest-prd \ - -t ${{ vars.DOCKERHUB_ORGANIZATION }}/hope-support-images:deduplication-engine-${{ github.sha }}-prd \ - -t ${{ vars.DOCKERHUB_ORGANIZATION }}/hope-support-images:deduplication-engine-${{ github.sha }} \ + --cache-to type=local,ref=${DOCKER_CACHE_IMAGE}:hde-dev-latest,dest=./.AAA \ + --cache-from ${DOCKER_CACHE_IMAGE}:hde-dev-latest \ + -t ${DOCKER_CACHE_IMAGE}:hde-dev-${LOCK_SHA} \ + -t ${DOCKER_CACHE_IMAGE}:hde-dev-latest \ -f ./docker/Dockerfile \ - --target prd \ - --push ./" - - if [ "${{ github.ref }}" = "refs/heads/master" ]; then - version=$(python3 -c "import sys; version=None; [version:=line.split('=')[1].strip().strip('\"') for line in open('pyproject.toml', 'r') if line.strip().startswith('version =')]; print(version if version else sys.exit(1))") - tagged_image=${{ vars.DOCKERHUB_ORGANIZATION }}/hope:deduplication-engine-$version - build_command="$build_command -t $tagged_image" - fi - - eval $build_command + --push \ + --target python_dev_deps . - trivy: - runs-on: ubuntu-latest - needs: [build_and_push_prd] + lint: + runs-on: ubuntu-20.04 + needs: [build] + container: + image: unicef/hope-support-images:hde-dev-latest + credentials: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} steps: - name: Checkout code uses: actions/checkout@v2 - - name: DockerHub login - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Run Trivy vulnerability scanner - uses: aquasecurity/trivy-action@master - with: - image-ref: '${{ vars.DOCKERHUB_ORGANIZATION }}/hope-support-images:deduplication-engine-${{ github.sha }}' - format: 'table' - exit-code: '0' - ignore-unfixed: true - vuln-type: 'os,library' - severity: 'CRITICAL,HIGH' + - name: Black + run: black --check src/ + - name: Flake8 + run: flake8 src/ - deploy: - runs-on: ubuntu-latest - needs: [unit_tests, black, flake8, build_and_push_prd] - if: | - github.event_name == 'push' && - ( - github.ref == 'refs/heads/develop' - ) + test: + runs-on: ubuntu-20.04 + needs: [build] + container: + image: unicef/hope-support-images:hde-dev-latest + credentials: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + ports: + - 8000:8000 + services: + redis: + image: redis + db: + image: postgres:14 + env: + POSTGRES_DATABASE: dedupe + POSTGRES_PASSWORD: postgres + POSTGRES_USERNAME: postgres + options: >- + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 + env: + DATABASE_URL: postgres://postgres:postgres@db:5432/dedupe + SECRET_KEY: secret_key + CACHE_URL: redis://redis:6379/0 + CELERY_BROKER_URL: redis://redis:6379/0 + PYTHONPATH: "/hde/code/src:/hde/__pypackages__/3.12/lib" steps: - - name: Trigger deploy + - name: Checkout code + uses: actions/checkout@v2 + - name: Run tests run: | - if [ ${{ github.ref }} == 'refs/heads/develop' ]; then - pipelineId=1309 - else - echo "No pipeline to trigger for ref ${{ github.ref }}" - exit 0 - fi - - IFS=',' read -ra pipelines <<< "$pipelineId" - for pipeline in "${pipelines[@]}"; do - jsonBody='{"variables": {"sha": {"isSecret": false, "value": "${{ github.sha }}"}, "tag": {"isSecret": false, "value": "deduplication-engine-${{ github.sha }}"}}}' - contentLength=$(echo -n $jsonBody | wc -c) - project=ICTD-HCT-MIS - organization=unicef - - echo Triggering deploy for pipeline $pipeline - echo JSON body: $jsonBody - - curl -f -v -L \ - -u ":${{ secrets.AZURE_PAT }}" \ - -H "Content-Type: application/json" \ - -H "Content-Length: $contentLength" \ - -d "$jsonBody" \ - https://dev.azure.com/$organization/$project/_apis/pipelines/$pipeline/runs?api-version=7.1-preview.1 - if [ $? -ne 0 ]; then - echo "Failed to trigger deploy for pipeline $pipeline" - exit 1 - fi - done \ No newline at end of file + pytest tests +# echo "===================================" +# ls -al +# docker run --rm \ +# -e PYTHONPATH=/hde/code/src:/hde/__pypackages__/3.12/lib \ +# -e CACHE_URL="${CACHE_URL}" \ +# -e DATABASE_URL="${DATABASE_URL}" \ +# -e SECRET_KEY="${SECRET_KEY}" \ +# -e CELERY_BROKER_URL="${CELERY_BROKER_URL}" \ +# -v ${PWD}:/hde/code/ \ +# -w /hde/code/ \ +# -t ${DOCKER_CACHE_IMAGE}:hde-dev-latest \ +# pytest tests/ --create-db -v --cov --cov-report xml:coverage.xml +# +# - name: Upload coverage to Codecov +# uses: codecov/codecov-action@v4 +# with: +# directory: ./coverage/reports/ +# env_vars: OS,PYTHON +# fail_ci_if_error: true +# files: /hde/code/coverage1.xml +# flags: unittests +# name: codecov-umbrella +# token: ${{ secrets.CODECOV_TOKEN }} +# verbose: true \ No newline at end of file diff --git a/.gitignore b/.gitignore index ab250972..e72af819 100644 --- a/.gitignore +++ b/.gitignore @@ -15,10 +15,14 @@ __pycache__/ !.pre-commit-config.yaml !.bumpversion.cfg !.trivyignore +!docker/bin/*.sh !bandit.yaml +build +dist coverage.xml Makefile site black.txt flake8 -.env +act.* + diff --git a/CHANGELOG.rst b/CHANGELOG.rst new file mode 100644 index 00000000..d1daad89 --- /dev/null +++ b/CHANGELOG.rst @@ -0,0 +1,4 @@ +v.0.1.0 2024-05-26 +================== + +No significant changes. diff --git a/docker/Dockerfile b/docker/Dockerfile index 339e74ef..2bc0e571 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,83 +1,150 @@ -# syntax=docker/dockerfile:1.7 ARG PYTHON_VER=3.12 -ARG PKG_DIR=/packages ARG BUILD_DATE=not_provided -ARG CHECKSUM=not_provided ARG VERSION=0.1.0 - -FROM python:$PYTHON_VER-slim-bullseye AS python - -FROM python AS common-env -ARG BUILD_DATE +ARG DEST_DIR=/hde +ARG PKG_DIR=${DEST_DIR}/__pypackages__/${PYTHON_VER} ARG CHECKSUM + +FROM python:$PYTHON_VER-slim-bullseye AS python_base +ARG DEST_DIR ARG PKG_DIR -ARG VERSION -ARG PYTHON_VER -ENV PKG_DIR=$PKG_DIR \ - PYPACKAGES=$PKG_DIR/__pypackages__/$PYTHON_VER ENV ADMINS="" \ BUILD_DATE=$BUILD_DATE \ - CHANNEL_URLS=""\ CHECKSUM=$CHECKSUM \ - CI_BUILD_ID=$CI_BUILD_ID \ - CI_COMMIT_SHORT_SHA=$CI_COMMIT_SHORT_SHA \ - CI_JOB_URL=$CI_JOB_URL \ DATABASE_URL="" \ - DEV_FOOTER_INFO="" \ + DEST_DIR=${DEST_DIR} \ DJANGO_SETTINGS_MODULE="hope_dedup_engine.config.settings" \ - DJSTRIPE_WEBHOOK_VALIDATION=""\ - DOCKER_TAG=$DOCKER_TAG \ INIT_RUN_CHECK=1 \ INIT_RUN_COLLECTSTATIC=1 \ INIT_RUN_MIGRATATIONS=1 \ INIT_RUN_UPGRADE=0 \ - INIT_START_BEAT=0 \ - INIT_START_BOB=0 \ - INIT_START_CELERY=0 \ - INIT_START_DAPHNE=0 \ - INIT_START_FLOWER=0 \ LOG_LEVEL="ERROR" \ MEDIA_ROOT="/var/hope_dedup_engine/media" \ MEDIA_URL="/media/" \ + PATH=${PKG_DIR}/bin:${PATH}:/usr/local/bin/ \ + PYTHONPATH=${PKG_DIR}/lib/:${PYTHONPATH} \ PYTHONDONTWRITEBYTECODE=1 \ PYTHONUNBUFFERED=1 \ - PYTHONPATH=$PYTHONPATH:$PYPACKAGES/lib:/code/src \ SECRET_KEY="secret-key-just-for-build" \ SENTRY_DSN="" \ - SOCIAL_AUTH_GOOGLE_OAUTH_KEY=""\ - SOCIAL_AUTH_GOOGLE_OAUTH_SECRET=""\ STATIC_ROOT="/var/hope_dedup_engine/static" \ STATIC_URL="/static/" \ UWSGI_PROCESSES=4 \ - VERSION=$VERSION \ - PATH=$PATH:$PYPACKAGES/bin + VERSION=$VERSION + +ARG GOSU_VERSION=1.17 +ARG GOSU_SHA256=bbc4136d03ab138b1ad66fa4fc051bafc6cc7ffae632b069a53657279a450de3 +ARG TINI_VERSION=0.19.0 +ARG TINI_SHA256=93dcc18adc78c65a028a84799ecf8ad40c936fdfc5f2a57b1acda5a8117fa82c +RUN set -x \ + && buildDeps=" \ + wget \ + " \ + && apt-get update && apt-get install -y --no-install-recommends $buildDeps \ + && rm -rf /var/lib/apt/lists/* \ + && wget --quiet -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-amd64" \ + && echo "$GOSU_SHA256 /usr/local/bin/gosu" | sha256sum --check --status \ + && chmod +x /usr/local/bin/gosu \ + && wget --quiet -O /usr/local/bin/tini "https://github.com/krallin/tini/releases/download/v$TINI_VERSION/tini-amd64" \ + && echo "$TINI_SHA256 /usr/local/bin/tini" | sha256sum --check --status \ + && chmod +x /usr/local/bin/tini \ + && apt-get purge -y --auto-remove $buildDeps +# sudo apt-get install libcairo2-dev libjpeg62-turbo-dev libpango1.0-dev libgif-dev build-essential g++ +# sudo apt-get install libopenblas-dev libwebp-dev + +RUN \ + --mount=type=cache,target=/var/cache/apt \ + apt-get update \ + && apt-get install -y --no-install-recommends \ + postgresql-client \ + libgl1 \ + libglib2.0-0 \ + libffi7 \ + libgif-dev \ + libjpeg-dev \ + libmagic1 \ + libopenblas-dev \ + libpng16-16 \ + libxml2 \ + libwebp-dev \ + mime-support \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* \ + && ldconfig + RUN ln -s -f /bin/true /usr/bin/chfn \ && groupadd --gid 1024 hope \ - && adduser --disabled-login --disabled-password --no-create-home --ingroup hope -q www - -FROM common-env AS common-os -ENV buildDeps="build-essential gcc cmake curl libjpeg-dev zlib1g-dev libffi-dev libssl-dev libpq-dev libgdal-dev libgl1-mesa-glx docker.io " -ENV runtimeDeps="postgresql-client libmagic1" -RUN rm -f /etc/apt/apt.conf.d/docker-clean \ - && echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache -RUN --mount=target=/var/lib/apt/lists,type=cache,sharing=locked \ - --mount=target=/var/cache/apt,type=cache,sharing=locked \ - apt-get update && \ - apt-get install -y --no-install-recommends $buildDeps $runtimeDeps && \ - rm -rf /var/lib/apt/lists/* -RUN pip install -U pip setuptools && pip install pdm - -FROM common-os AS builder -# ARG CHECKSUM -WORKDIR $PKG_DIR -# COPY docker/conf/* /conf/ -COPY docker/entrypoint.sh docker/wait-for-it.sh /usr/local/bin/ -COPY pyproject.toml pdm.lock pdm.toml ./ -RUN pdm sync --prod --no-editable --no-self -# RUN echo $CHECKSUM > /CHECKSUM - -FROM builder AS dev -RUN pdm sync --no-editable --no-self -WORKDIR /code/ -COPY .. ./ -ENTRYPOINT ["entrypoint.sh"] + && adduser --disabled-login --disabled-password --no-create-home --ingroup hope -q hde \ + && mkdir ${DEST_DIR} \ + && chown hde:hope ${DEST_DIR} \ + && echo $CHECKSUM > /CHECKSUM + +COPY docker/bin/* /usr/local/bin/ +COPY docker/conf/* /conf/ + +FROM python_base AS build_deps +ARG DEST_DIR +ENV buildDeps="build-essential \ + cmake \ + curl \ + gcc \ + libgdal-dev \ + liblapack-dev \ + libpng-dev \ + libpq-dev \ + libssl-dev \ + python3-dev \ + zlib1g-dev " + +RUN apt-get update \ + && apt-get install -y --no-install-recommends \ + $buildDeps \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* + + +FROM build_deps AS python_dev_deps +ARG DEST_DIR +WORKDIR ${DEST_DIR} +COPY pyproject.toml . +COPY pdm.lock . +ENV PDM_CHECK_UPDATE=0 \ + PDM_CACHE_DIR=/cache/ \ + PDM_USE_VENV=0 \ + PDM_INSTALL_PARALLEL=0 +RUN pip install -U pip setuptools pdm \ + && mkdir -p ${DEST_DIR}/__pypackages__ \ + && pdm sync --no-editable -v --no-self + + +FROM build_deps AS python_prod_deps +ARG DEST_DIR +WORKDIR ${DEST_DIR} +COPY pyproject.toml . +COPY pdm.lock . +COPY ./src ${DEST_DIR}/src +ENV PDM_CHECK_UPDATE=0 \ + PDM_CACHE_DIR=/cache/ \ + PDM_USE_VENV=0 \ + PDM_INSTALL_PARALLEL=0 +RUN pip install -U pip setuptools pdm \ + && mkdir -p ${DEST_DIR}/__pypackages__ \ + && pdm sync --no-editable -v --prod \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* + +FROM python_base AS dev +COPY --chown=hde:hope --from=python_dev_deps ${DEST_DIR}/__pypackages__ ${DEST_DIR}/__pypackages__ +COPY ./src ${DEST_DIR}/src +ENV PYTHONPATH=${DEST_DIR}/src/:${PYTHONPATH} + + +FROM python_base AS dist +ENV PYTHONPATH=${DEST_DIR}/src/:${PYTHONPATH} +WORKDIR ${DEST_DIR} +COPY --chown=hde:hope --from=python_prod_deps ${DEST_DIR}/__pypackages__ ${DEST_DIR}/__pypackages__ +USER hde +CMD "run" +ENTRYPOINT exec docker-entrypoint.sh "$0" "$@" + + diff --git a/docker/Makefile b/docker/Makefile new file mode 100644 index 00000000..55ec3542 --- /dev/null +++ b/docker/Makefile @@ -0,0 +1,182 @@ +BUILD_DATE:=$(shell date +"%Y-%m-%d %H:%M") +CHECKSUM?=$(shell sha1sum ../pdm.lock | awk '{print $$1}') + +VERSION?=0.1.0 +HASH_SEEDS=pdm.lock docker/bin/* docker/conf/* docker/Dockerfile +AA=$(cd .. && sha1sum ${HASH_SEEDS}) +LOCK_SHA?=$(shell cd .. && sha1sum ${HASH_SEEDS} | sha1sum | awk '{print $1}' | cut -c 1-8) + +COMMIT_SHA?=$(shell git rev-parse --short HEAD) +CI_REGISTRY_IMAGE?="" +CONTAINER_NAME?=hde + + +define PRINT_HELP_PYSCRIPT +import re, sys + +for line in sys.stdin: + match = re.match(r'^([a-zA-Z0-9_-]+):.*?## (.*)$$', line) + if match: + target, help = match.groups() + print("%-20s %s" % (target, help)) +endef +export PRINT_HELP_PYSCRIPT + +help: + @python -c "$$PRINT_HELP_PYSCRIPT" < $(MAKEFILE_LIST) + + +# --cache-from "${CI_REGISTRY_IMAGE}/base:${LOCK_SHA}" \ +# --cache-from "${CI_REGISTRY_IMAGE}/deps:${LOCK_SHA}" \ +# --cache-from "${CI_REGISTRY_IMAGE}/builder:${LOCK_SHA}" \ + +sha: +# @cd .. && sha1sum ${HASH_SEEDS} | sha1sum | awk '{print $1}' | cut -c 1-8 + @echo ${LOCK_SHA} + +.build: + docker login -u saxix -p ${DOCKERHUB_TOKEN} + cd .. && docker buildx build \ + --progress=plain \ + --build-arg BUILDKIT_INLINE_CACHE=1 \ + --build-arg VERSION=${VERSION} \ + --build-arg BUILD_DATE="${BUILD_DATE}" \ + --build-arg CHECKSUM="${LOCK_SHA}" \ + --build-arg COMMIT="${COMMIT_SHA}" \ + --cache-from ${DOCKER_CACHE_IMAGE}:hde-${STAGE}-latest \ + ${EXTRA} \ + -t "${DOCKER_IMAGE}:${TAG}" \ + --push \ + -f docker/Dockerfile . + docker image ls "${DOCKER_IMAGE}:${TAG}" + @docker inspect -f "{{json .Config.Labels}}" ${DOCKER_IMAGE}:${TAG} + +base: ## build 'builder' image + STAGE="python_base" \ + EXTRA='--target python_base' \ + DOCKER_IMAGE="${CI_REGISTRY_IMAGE}" \ + TAG="base-${LOCK_SHA}" \ + $(MAKE) .build + +buildDeps: ## build 'builder' image + STAGE="build_deps" \ + EXTRA='--cache-from "${CI_REGISTRY_IMAGE}:base-${LOCK_SHA}" --target build_deps' \ + DOCKER_IMAGE="${CI_REGISTRY_IMAGE}" \ + TAG="deps-${LOCK_SHA}" \ + $(MAKE) .build + +pythonDevDeps: ## build 'builder' image + STAGE="python_dev_deps" \ + EXTRA='--cache-from "${CI_REGISTRY_IMAGE}:deps-${LOCK_SHA}" --target python_dev_deps' \ + DOCKER_IMAGE="${CI_REGISTRY_IMAGE}" \ + TAG="python_dev_deps-${LOCK_SHA}" \ + $(MAKE) .build + +pythonProdDeps: ## build 'builder' image + STAGE="python_prod_deps" \ + EXTRA='--cache-from "${CI_REGISTRY_IMAGE}:deps-${LOCK_SHA}" --target python_prod_deps' \ + DOCKER_IMAGE="${CI_REGISTRY_IMAGE}" \ + TAG="python_prod_deps-${LOCK_SHA}" \ + $(MAKE) .build + +dev: ## build dev image + STAGE='dev' \ + EXTRA='--cache-from "${CI_REGISTRY_IMAGE}:python_dev_deps-${LOCK_SHA}" --target dev' \ + DOCKER_IMAGE="${CI_REGISTRY_IMAGE}" \ + TAG="dev" \ + $(MAKE) .build + + +#test: ## build test image +# EXTRA='--target test ' \ +# DOCKER_IMAGE="${CI_REGISTRY_IMAGE}/test" \ +# TAG="${COMMIT_SHA}" \ +# $(MAKE) .build + +dist: ## build prod image + STAGE='dist' \ + EXTRA='--cache-from "${CI_REGISTRY_IMAGE}:base-${LOCK_SHA}" \ + --cache-from "${CI_REGISTRY_IMAGE}:deps-${LOCK_SHA}" --target dist' \ + DOCKER_IMAGE="${CI_REGISTRY_IMAGE}" \ + TAG="${VERSION}" \ + $(MAKE) .build + docker tag ${CI_REGISTRY_IMAGE}:${VERSION} ${CI_REGISTRY_IMAGE}:latest + +push: ## build prod image + + echo ${IMAGE} + +all: base buildDeps pythonDevDeps pythonProdDeps dev info + +info: + docker image ls "${CI_REGISTRY_IMAGE}" + +check: + DOCKER_IMAGE=${CI_REGISTRY_IMAGE}:${VERSION} \ + RUN_OPTIONS=-it \ + CMD="django-admin check" \ + $(MAKE) .run + +# DOCKER_IMAGE="${CI_REGISTRY_IMAGE}" \ +# TAG="${VERSION}-${COMMIT}" \ +# $(MAKE) .build + +.run: + cd .. && docker run \ + --rm \ + --name=${CONTAINER_NAME} \ + -p 8000:8000 \ + -e ADMINS="${ADMINS}" \ + -e ADMIN_EMAIL="${ADMIN_EMAIL}" \ + -e ADMIN_PASSWORD="${ADMIN_PASSWORD}" \ + -e ALLOWED_HOSTS="*" \ + -e CACHE_URL="${CACHE_URL}" \ + -e CELERY_BROKER_URL="${CELERY_BROKER_URL}" \ + -e CSRF_COOKIE_SECURE="${CSRF_COOKIE_SECURE}" \ + -e DATABASE_URL="${DATABASE_URL}" \ + -e DEBUG="0" \ + -e INIT_RUN_UPGRADE=1 \ + -e MEDIA_ROOT="/tmp/media" \ + -e SECRET_KEY="${SECRET_KEY}" \ + -e SENTRY_DSN="${SENTRY_DSN}" \ + -e STATIC_ROOT="/tmp/static" \ + ${RUN_OPTIONS} \ + -t "${DOCKER_IMAGE}" \ + ${CMD} + +# -v ${PWD}/docker/bin/docker-entrypoint.sh:/usr/local/bin/docker-entrypoint.sh \ +# -v ${PWD}/docker/conf/uwsgi.ini:/conf/uwsgi.ini \ + +shell: ## run production image + DOCKER_IMAGE=${CI_REGISTRY_IMAGE}:${VERSION} \ + RUN_OPTIONS=-it \ + CMD=/bin/bash \ + $(MAKE) .run + + +shell-target: ## run production image + DOCKER_IMAGE="${CI_REGISTRY_IMAGE}/$S:latest" \ + RUN_OPTIONS=-it \ + CMD=/bin/bash \ + $(MAKE) .run + +run: ## run production image + DOCKER_IMAGE=${CI_REGISTRY_IMAGE}:${VERSION} \ + CMD=run \ + $(MAKE) .run + +test: + DOCKER_IMAGE=${CI_REGISTRY_IMAGE}/python_dev_deps:${LOCK_SHA} \ + RUN_OPTIONS="-v .:/hde/code/ -w /hde/code/ -it" \ + CMD="pytest tests/ --create-db -v; ls -al " \ + $(MAKE) .run +# +#run-target: ## run production image +# DOCKER_IMAGE="${CI_REGISTRY_IMAGE}/$S:latest" \ +# $(MAKE) .run +# +#test: ## run production image +# DOCKER_IMAGE="${CI_REGISTRY_IMAGE}/tests:${COMMIT}" \ +# RUN_OPTIONS=-it \ +# CMD="/bin/bash" \ +# $(MAKE) .run diff --git a/docker/bin/docker-entrypoint.sh b/docker/bin/docker-entrypoint.sh new file mode 100755 index 00000000..0ce09c78 --- /dev/null +++ b/docker/bin/docker-entrypoint.sh @@ -0,0 +1,55 @@ +#!/bin/sh -e + +alias env='env|sort' + +export MEDIA_ROOT="${MEDIA_ROOT:-/var/media}" +export STATIC_ROOT="${STATIC_ROOT:-/var/static}" +export DJANGO_SETTINGS_MODULE="${DJANGO_SETTINGS_MODULE:-"hope_dedup_engine.config.settings"}" + + +mkdir -p /var/run "${MEDIA_ROOT}" "${STATIC_ROOT}" || echo "Cannot create dir" + +echo "Executing '$1'..." +echo "INIT_RUN_UPGRADE '$INIT_RUN_UPGRADE'" +echo " INIT_RUN_CHECK '$INIT_RUN_CHECK'" +echo " INIT_RUN_COLLECTSTATIC '$INIT_RUN_COLLECTSTATIC'" +echo " INIT_RUN_MIGRATATIONS '$INIT_RUN_MIGRATATIONS'" + +case "$1" in + run) + if [ "$INIT_RUN_CHECK" = "1" ];then + echo "Running Django checks..." + django-admin check --deploy + fi + OPTS="--no-check -v 1" + if [ "$INIT_RUN_UPGRADE" = "1" ];then + if [ "$INIT_RUN_COLLECTSTATIC" != "1" ];then + OPTS="$OPTS --no-static" + fi + if [ "$INIT_RUN_MIGRATATIONS" != "1" ];then + OPTS="$OPTS --no-migrate" + fi + echo "Running 'upgrade $OPTS'" + django-admin upgrade $OPTS + fi + set -- tini -- "$@" + echo "Starting uwsgi..." + exec uwsgi --ini /conf/uwsgi.ini + ;; + worker) + exec celery -A hope_dedup_engine.celery worker -E --loglevel=ERROR --concurrency=4 + ;; + beat) + exec celery -A hope_dedup_engine.celery beat -E --loglevel=ERROR ---scheduler django_celery_beat.schedulers:DatabaseScheduler + ;; + dev) + until pg_isready -h db -p 5432; + do echo "waiting for database"; sleep 2; done; + django-admin collectstatic --no-input + django-admin migrate + django-admin runserver 0.0.0.0:8000 + ;; + *) + exec "$@" + ;; +esac diff --git a/docker/bin/release-info.sh b/docker/bin/release-info.sh new file mode 100755 index 00000000..734e2a4c --- /dev/null +++ b/docker/bin/release-info.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +echo "CHECKSUM ${CHECKSUM}" +echo "uwsgi " `uwsgi --version` diff --git a/docker/wait-for-it.sh b/docker/bin/wait-for-it.sh similarity index 100% rename from docker/wait-for-it.sh rename to docker/bin/wait-for-it.sh diff --git a/docker/conf/.dockerignore b/docker/conf/.dockerignore deleted file mode 100644 index 75db72a5..00000000 --- a/docker/conf/.dockerignore +++ /dev/null @@ -1 +0,0 @@ -nginx.conf diff --git a/docker/conf/.gitignore b/docker/conf/.gitignore deleted file mode 100644 index 75db72a5..00000000 --- a/docker/conf/.gitignore +++ /dev/null @@ -1 +0,0 @@ -nginx.conf diff --git a/docker/conf/mime.types b/docker/conf/mime.types new file mode 100644 index 00000000..8c6daa1b --- /dev/null +++ b/docker/conf/mime.types @@ -0,0 +1,2187 @@ +############################################################################### +# +# Media (MIME) types and the extensions that represent them. +# +# The format of this file is a media type on the left and zero or more +# filename extensions on the right. Programs using this file will map +# files ending with those extensions to the associated type. +# +# This file is part of the "media-types" package. Please report a bug using +# the "reportbug" command of the "reportbug" package if you would like new +# types or extensions to be added. +# +# The reason that all types are managed by the media-types package instead +# allowing individual packages to install types in much the same way as they +# add entries in to the mailcap file is so these types can be referenced by +# other programs (such as a web server) even if the specific support package +# for that type is not installed. +# +# Users can add their own types if they wish by creating a ".mime.types" +# file in their home directory. Definitions included there will take +# precedence over those listed here. +# +############################################################################### + +application/1d-interleaved-parityfec +application/3gpdash-qoe-report+xml +application/3gpp-ims+xml +application/A2L a2l +application/activemessage +application/activity+json +application/alto-costmapfilter+json +application/alto-costmap+json +application/alto-directory+json +application/alto-endpointcost+json +application/alto-endpointcostparams+json +application/alto-endpointprop+json +application/alto-endpointpropparams+json +application/alto-error+json +application/alto-networkmapfilter+json +application/alto-networkmap+json +application/alto-updatestreamcontrol+json +application/alto-updatestreamparams+json +application/AML aml +application/andrew-inset ez +application/annodex anx +application/applefile +application/ATF atf +application/ATFX atfx +application/atomcat+xml atomcat +application/atomdeleted+xml atomdeleted +application/atomicmail +application/atomserv+xml atomsrv +application/atomsvc+xml atomsvc +application/atom+xml atom +application/atsc-dwd+xml dwd +application/atsc-dynamic-event-message +application/atsc-held+xml held +application/atsc-rdt+json +application/atsc-rsat+xml rsat +application/ATXML atxml +application/auth-policy+xml apxml +application/bacnet-xdd+zip xdd +application/batch-SMTP +application/bbolin lin +application/beep+xml +application/calendar+json +application/calendar+xml xcs +application/call-completion +application/cals-1840 +application/cap+xml +application/cbor cbor +application/cbor-seq +application/cccex c3ex +application/ccmp+xml ccmp +application/ccxml+xml ccxml +application/CDFX+XML cdfx +application/cdmi-capability cdmia +application/cdmi-container cdmic +application/cdmi-domain cdmid +application/cdmi-object cdmio +application/cdmi-queue cdmiq +application/cdni +application/CEA cea +application/cea-2018+xml +application/cellml+xml cellml cml +application/cfw +application/clue_info+xml clue +application/clue+xml +application/cms cmsc +application/cnrp+xml +application/coap-group+json +application/coap-payload +application/commonground +application/conference-info+xml +application/cose +application/cose-key +application/cose-key-set +application/cpl+xml cpl +application/csrattrs csrattrs +application/CSTAdata+xml +application/csta+xml +application/csvm+json +application/cu-seeme cu +application/cwt +application/cybercash +application/dashdelta mpdd +application/dash+xml mpd +application/davmount+xml davmount +application/dca-rft +application/DCD dcd +application/dec-dx +application/dialog-info+xml +application/dicom dcm +application/dicom+json +application/dicom+xml +application/DII dii +application/DIT dit +application/dns +application/dns+json +application/dns-message +application/docbook+xml +application/dots+cbor +application/dskpp+xml xmls +application/dsptype tsp +application/dssc+der dssc +application/dssc+xml xdssc +application/dvcs dvc +application/ecmascript es +application/edi-consent +application/EDI-Consent +application/edifact +application/EDIFACT +application/edi-x12 +application/EDI-X12 +application/efi efi +application/EmergencyCallData.Comment+xml +application/EmergencyCallData.Control+xml +application/EmergencyCallData.DeviceInfo+xml +application/EmergencyCallData.eCall.MSD +application/EmergencyCallData.ProviderInfo+xml +application/EmergencyCallData.ServiceInfo+xml +application/EmergencyCallData.SubscriberInfo+xml +application/EmergencyCallData.VEDS+xml +application/emma+xml emma +application/emotionml+xml emotionml +application/encaprtp +application/epp+xml +application/epub+zip epub +application/eshop +application/exi exi +application/expect-ct-report+json +application/fastinfoset finf +application/fastsoap +application/fdt+xml fdt +application/fhir+json +application/fhir+xml +application/fits +application/flexfec +application/font-tdpfr pfr +application/framework-attributes+xml +application/futuresplash spl +application/geo+json geojson +application/geo+json-seq +application/geopackage+sqlite3 gpkg +application/geoxacml+xml +application/ghostview +application/gltf-buffer glbin glbuf +application/gml+xml gml +application/gzip gz +application/H224 +application/held+xml +application/hta hta +application/http +application/hyperstudio stk +application/ibe-key-request+xml +application/ibe-pkg-reply+xml +application/ibe-pp-data +application/iges +application/im-iscomposing+xml +application/index +application/index.cmd +application/index.obj +application/index.response +application/index.vnd +application/inkml+xml ink inkml +application/iotp +application/ipfix ipfix +application/ipp +application/isup +application/its+xml its +application/java-archive jar +application/javascript js mjs +application/java-serialized-object ser +application/java-vm class +application/jf2feed+json +application/jose +application/jose+json +application/jrd+json jrd +application/json json +application/json-patch+json json-patch +application/json-seq +application/jwk+json +application/jwk-set+json +application/jwt +application/kpml-request+xml +application/kpml-response+xml +application/ld+json jsonld +application/lgr+xml lgr +application/link-format wlnk +application/load-control+xml +application/lostsync+xml lostsyncxml +application/lost+xml lostxml +application/lpf+zip lpf +application/LXF lxf +application/m3g m3g +application/mac-binhex40 hqx +application/mac-compactpro cpt +application/macwriteii +application/mads+xml mads +application/marc mrc +application/marcxml+xml mrcx +application/mathematica ma mb +application/mathml-content+xml +application/mathml-presentation+xml +application/mathml+xml mml +application/mbms-associated-procedure-description+xml +application/mbms-deregister+xml +application/mbms-envelope+xml +application/mbms-msk-response+xml +application/mbms-msk+xml +application/mbms-protection-description+xml +application/mbms-reception-report+xml +application/mbms-register-response+xml +application/mbms-register+xml +application/mbms-schedule+xml +application/mbms-user-service-description+xml +application/mbox mbox +application/media_control+xml +application/media-policy-dataset+xml +application/mediaservercontrol+xml +application/merge-patch+json +application/metalink4+xml meta4 +application/mets+xml mets +application/MF4 mf4 +application/mikey +application/mmt-aei+xml maei +application/mmt-usd+xml musd +application/mods+xml mods +application/mosskey-data +application/mosskey-request +application/moss-keys +application/moss-signature +application/mp21 m21 mp21 +application/mp4 +application/mpeg4-generic +application/mpeg4-iod +application/mpeg4-iod-xmt +application/mrb-consumer+xml +application/mrb-publish+xml +application/msaccess mdb +application/msc-ivr+xml +application/msc-mixer+xml +application/ms-tnef +application/msword doc +application/mud+json +application/multipart-core +application/mxf mxf +application/nasdata +application/news-checkgroups +application/news-groupinfo +application/news-message-id +application/news-transmission +application/nlsml+xml +application/node +application/n-quads nq +application/nss +application/n-triples nt +application/ocsp-request orq +application/ocsp-response ors +application/octet-stream bin deploy msu msp +application/oda oda +application/odm+xml +application/ODX odx +application/oebps-package+xml opf +application/ogg ogx +application/onenote one onetoc2 onetmp onepkg +application/oscore +application/oxps oxps +application/p2p-overlay+xml relo +application/parityfec +application/passport +application/patch-ops-error+xml +application/pdf pdf +application/PDX pdx +application/pem-certificate-chain pem +application/pgp-encrypted pgp +application/pgp-keys asc key +application/pgp-signature sig +application/pics-rules prf +application/pidf-diff+xml +application/pidf+xml +application/pkcs10 p10 +application/pkcs12 p12 pfx +application/pkcs7-mime p7m p7c p7z +application/pkcs7-signature p7s +application/pkcs8 p8 +application/pkcs8-encrypted p8e +application/pkix-attr-cert ac +application/pkix-cert cer +application/pkixcmp pki +application/pkix-crl crl +application/pkix-pkipath pkipath +application/pls+xml +application/poc-settings+xml +application/postscript ps ai eps epsi epsf eps2 eps3 +application/ppsp-tracker+json +application/problem+json +application/problem+xml +application/provenance+xml provx +application/prs.alvestrand.titrax-sheet +application/prs.cww cw cww +application/prs.hpub+zip hpub +application/prs.nprend rnd rct +application/prs.plucker +application/prs.rdf-xml-crypt rdf-crypt +application/prs.xsf+xml xsf +application/pskc+xml pskcxml +application/pvd+json +application/qsig +application/raptorfec +application/rdap+json +application/rdf+xml rdf +application/reginfo+xml rif +application/relax-ng-compact-syntax rnc +application/remote-printing +application/reputon+json +application/resource-lists-diff+xml rld +application/resource-lists+xml rl +application/rfc+xml rfcxml +application/riscos +application/rlmi+xml +application/rls-services+xml rs +application/route-apd+xml rapd +application/route-s-tsid+xml sls +application/route-usd+xml rusd +application/rpki-ghostbusters gbr +application/rpki-manifest mft +application/rpki-publication +application/rpki-roa roa +application/rpki-updown +application/rtf rtf +application/rtploopback +application/rtx +application/samlassertion+xml +application/samlmetadata+xml +application/sbe +application/sbml+xml +application/scaip+xml +application/scim+json scim +application/scvp-cv-request scq +application/scvp-cv-response scs +application/scvp-vp-request spq +application/scvp-vp-response spp +application/sdp sdp +application/secevent+jwt +application/senml+cbor senmlc +application/senml-etch+cbor senml-etchc +application/senml-etch+json senml-etchj +application/senml-exi senmle +application/senml+json senml +application/senml+xml senmlx +application/sensml+cbor sensmlc +application/sensml-exi sensmle +application/sensml+json sensml +application/sensml+xml sensmlx +application/sep-exi +application/sep+xml +application/session-info +application/set-payment +application/set-payment-initiation +application/set-registration +application/set-registration-initiation +application/sgml +application/sgml-open-catalog soc +application/shf+xml shf +application/sieve siv sieve +application/simple-filter+xml cl +application/simple-message-summary +application/simpleSymbolContainer +application/slate +application/smil+xml smil smi sml +application/smpte336m +application/soap+fastinfoset +application/soap+xml +application/sparql-query rq +application/sparql-results+xml srx +application/spirits-event+xml +application/sql sql +application/srgs gram +application/srgs+xml grxml +application/sru+xml sru +application/ssml+xml ssml +application/stix+json stix +application/swid+xml swidtag +application/tamp-apex-update tau +application/tamp-apex-update-confirm auc +application/tamp-community-update tcu +application/tamp-community-update-confirm cuc +application/tamp-error ter +application/tamp-sequence-adjust tsa +application/tamp-sequence-adjust-confirm sac +application/tamp-status-query +application/tamp-status-response +application/tamp-update tur +application/tamp-update-confirm tuc +application/taxii+json +application/td+json jsontd +application/tei+xml tei teiCorpus odd +application/TETRA_ISI +application/thraud+xml tfi +application/timestamped-data tsd +application/timestamp-query tsq +application/timestamp-reply tsr +application/tlsrpt+gzip +application/tlsrpt+json +application/tnauthlist +application/trickle-ice-sdpfrag +application/trig trig +application/ttml+xml ttml +application/tve-trigger +application/tzif +application/tzif-leap +application/ulpfec +application/urc-grpsheet+xml gsheet +application/urc-ressheet+xml rsheet +application/urc-targetdesc+xml td +application/urc-uisocketdesc+xml uis +application/vcard+json +application/vcard+xml +application/vemmi +application/vnd.1000minds.decision-model+xml 1km +application/vnd.3gpp2.bcmcsinfo+xml +application/vnd.3gpp2.sms sms +application/vnd.3gpp2.tcap tcap +application/vnd.3gpp.access-transfer-events+xml +application/vnd.3gpp.bsf+xml +application/vnd.3gpp.GMOP+xml +application/vnd.3gpp.mcdata-affiliation-command+xml +application/vnd.3gpp.mcdata-info+xml +application/vnd.3gpp.mcdata-signalling +application/vnd.3gpp.mcdata-ue-config+xml +application/vnd.3gpp.mcdata-user-profile+xml +application/vnd.3gpp.mcptt-affiliation-command+xml +application/vnd.3gpp.mcptt-floor-request+xml +application/vnd.3gpp.mcptt-info+xml +application/vnd.3gpp.mcptt-location-info+xml +application/vnd.3gpp.mcptt-mbms-usage-info+xml +application/vnd.3gpp.mcptt-service-config+xml +application/vnd.3gpp.mcptt-signed+xml +application/vnd.3gpp.mcptt-ue-config+xml +application/vnd.3gpp.mcptt-ue-init-config+xml +application/vnd.3gpp.mcptt-user-profile+xml +application/vnd.3gpp.mc-signalling-ear +application/vnd.3gpp.mcvideo-affiliation-command+xml +application/vnd.3gpp.mcvideo-info+xml +application/vnd.3gpp.mcvideo-location-info+xml +application/vnd.3gpp.mcvideo-mbms-usage-info+xml +application/vnd.3gpp.mcvideo-service-config+xml +application/vnd.3gpp.mcvideo-transmission-request+xml +application/vnd.3gpp.mcvideo-ue-config+xml +application/vnd.3gpp.mcvideo-user-profile+xml +application/vnd.3gpp.mid-call+xml +application/vnd.3gpp.pic-bw-large plb +application/vnd.3gpp.pic-bw-small psb +application/vnd.3gpp.pic-bw-var pvb +application/vnd.3gpp-prose-pc3ch+xml +application/vnd.3gpp-prose+xml +application/vnd.3gpp.sms +application/vnd.3gpp.sms+xml +application/vnd.3gpp.srvcc-ext+xml +application/vnd.3gpp.SRVCC-info+xml +application/vnd.3gpp.state-and-event-info+xml +application/vnd.3gpp.ussd+xml +application/vnd.3gpp-v2x-local-service-information +application/vnd.3lightssoftware.imagescal imgcal +application/vnd.3M.Post-it-Notes pwn +application/vnd.accpac.simply.aso aso +application/vnd.accpac.simply.imp imp +application/vnd.acucobol acu +application/vnd.acucorp atc acutc +application/vnd.adobe.flash.movie swf +application/vnd.adobe.formscentral.fcdt fcdt +application/vnd.adobe.fxp fxp fxpl +application/vnd.adobe.partial-upload +application/vnd.adobe.xdp+xml xdp +application/vnd.adobe.xfdf xfdf +application/vnd.aether.imp +application/vnd.afpc.afplinedata +application/vnd.afpc.afplinedata-pagedef +application/vnd.afpc.foca-charset +application/vnd.afpc.foca-codedfont +application/vnd.afpc.foca-codepage +application/vnd.afpc.modca list3820 listafp afp pseg3820 +application/vnd.afpc.modca-formdef +application/vnd.afpc.modca-mediummap +application/vnd.afpc.modca-objectcontainer +application/vnd.afpc.modca-overlay ovl +application/vnd.afpc.modca-pagesegment psg +application/vnd.ah-barcode +application/vnd.ahead.space ahead +application/vnd.airzip.filesecure.azf azf +application/vnd.airzip.filesecure.azs azs +application/vnd.amadeus+json +application/vnd.amazon.mobi8-ebook azw3 +application/vnd.americandynamics.acc acc +application/vnd.amiga.ami ami +application/vnd.amundsen.maze+xml +application/vnd.android.ota ota +application/vnd.android.package-archive apk +application/vnd.anki apkg +application/vnd.anser-web-certificate-issue-initiation cii +application/vnd.anser-web-funds-transfer-initiation fti +application/vnd.antix.game-component +application/vnd.apache.thrift.binary +application/vnd.apache.thrift.compact +application/vnd.apache.thrift.json +application/vnd.api+json +application/vnd.aplextor.warrp+json +application/vnd.apothekende.reservation+json +application/vnd.apple.installer+xml dist distz pkg mpkg +application/vnd.apple.keynote keynote +application/vnd.apple.mpegurl m3u8 +application/vnd.apple.numbers numbers +application/vnd.apple.pages pages +application/vnd.aristanetworks.swi swi +application/vnd.artisan+json artisan +application/vnd.artsquare +application/vnd.astraea-software.iota iota +application/vnd.audiograph aep +application/vnd.autopackage package +application/vnd.avalon+json +application/vnd.avistar+xml +application/vnd.balsamiq.bmml+xml bmml +application/vnd.balsamiq.bmpr bmpr +application/vnd.banana-accounting ac2 +application/vnd.bbf.usp.error +application/vnd.bbf.usp.msg +application/vnd.bbf.usp.msg+json +application/vnd.bekitzur-stech+json +application/vnd.bint.med-content +application/vnd.biopax.rdf+xml +application/vnd.blink-idb-value-wrapper +application/vnd.blueice.multipass mpm +application/vnd.bluetooth.ep.oob ep +application/vnd.bluetooth.le.oob le +application/vnd.bmi bmi +application/vnd.bpf +application/vnd.bpf3 +application/vnd.businessobjects rep +application/vnd.byu.uapi+json +application/vnd.cab-jscript +application/vnd.canon-cpdl +application/vnd.canon-lips +application/vnd.capasystems-pg+json +application/vnd.cendio.thinlinc.clientconf tlclient +application/vnd.century-systems.tcp_stream +application/vnd.chemdraw+xml cdxml +application/vnd.chess-pgn pgn +application/vnd.chipnuts.karaoke-mmd mmd +application/vnd.ciedi +application/vnd.cinderella cdy +application/vnd.cirpack.isdn-ext +application/vnd.citationstyles.style+xml csl +application/vnd.claymore cla +application/vnd.cloanto.rp9 rp9 +application/vnd.clonk.c4group c4g c4d c4f c4p c4u +application/vnd.cluetrust.cartomobile-config c11amc +application/vnd.cluetrust.cartomobile-config-pkg c11amz +application/vnd.coffeescript coffee +application/vnd.collabio.xodocuments.document xodt +application/vnd.collabio.xodocuments.document-template xott +application/vnd.collabio.xodocuments.presentation xodp +application/vnd.collabio.xodocuments.presentation-template xotp +application/vnd.collabio.xodocuments.spreadsheet xods +application/vnd.collabio.xodocuments.spreadsheet-template xots +application/vnd.collection.doc+json +application/vnd.collection+json +application/vnd.collection.next+json +application/vnd.comicbook-rar cbr +application/vnd.comicbook+zip cbz +application/vnd.commerce-battelle icf icd ic0 ic1 ic2 ic3 ic4 ic5 ic6 ic7 ic8 +application/vnd.commonspace csp cst +application/vnd.comsocaller +application/vnd.contact.cmsg cdbcmsg +application/vnd.coreos.ignition+json ign ignition +application/vnd.cosmocaller cmc +application/vnd.crick.clicker clkx +application/vnd.crick.clicker.keyboard clkk +application/vnd.crick.clicker.palette clkp +application/vnd.crick.clicker.template clkt +application/vnd.crick.clicker.wordbank clkw +application/vnd.criticaltools.wbs+xml wbs +application/vnd.cryptii.pipe+json +application/vnd.crypto-shade-file ssvc +application/vnd.ctc-posml pml +application/vnd.ctct.ws+xml +application/vnd.cups-pdf +application/vnd.cups-postscript +application/vnd.cups-ppd ppd +application/vnd.cups-raster +application/vnd.cups-raw +application/vnd.curl +application/vnd.cyan.dean.root+xml +application/vnd.cybank +application/vnd.d2l.coursepackage1p0+zip +application/vnd.dart dart +application/vnd.datapackage+json +application/vnd.dataresource+json +application/vnd.data-vision.rdz rdz +application/vnd.dbf dbf +application/vnd.debian.binary-package deb ddeb udeb +application/vnd.dece.data uvf uvvf uvd uvvd +application/vnd.dece.ttml+xml uvt uvvt +application/vnd.dece.unspecified uvx uvvx +application/vnd.dece.zip uvz uvvz +application/vnd.denovo.fcselayout-link fe_launch +application/vnd.desmume.movie dsm +application/vnd.dir-bi.plate-dl-nosuffix +application/vnd.dm.delegation+xml +application/vnd.dna dna +application/vnd.document+json docjson +application/vnd.dolby.mobile.1 +application/vnd.dolby.mobile.2 +application/vnd.doremir.scorecloud-binary-document scld +application/vnd.dpgraph dpg mwc dpgraph +application/vnd.dreamfactory dfac +application/vnd.drive+json +application/vnd.dtg.local +application/vnd.dtg.local.flash fla +application/vnd.dtg.local.html +application/vnd.dvb.ait ait +application/vnd.dvb.dvbisl+xml +application/vnd.dvb.dvbj +application/vnd.dvb.esgcontainer +application/vnd.dvb.ipdcdftnotifaccess +application/vnd.dvb.ipdcesgaccess +application/vnd.dvb.ipdcesgaccess2 +application/vnd.dvb.ipdcesgpdd +application/vnd.dvb.ipdcroaming +application/vnd.dvb.iptv.alfec-base +application/vnd.dvb.iptv.alfec-enhancement +application/vnd.dvb.notif-aggregate-root+xml +application/vnd.dvb.notif-container+xml +application/vnd.dvb.notif-generic+xml +application/vnd.dvb.notif-ia-msglist+xml +application/vnd.dvb.notif-ia-registration-request+xml +application/vnd.dvb.notif-ia-registration-response+xml +application/vnd.dvb.notif-init+xml +application/vnd.dvb.pfr +application/vnd.dvb.service svc +application/vnd.dxr +application/vnd.dynageo geo +application/vnd.dzr dzr +application/vnd.easykaraoke.cdgdownload +application/vnd.ecdis-update +application/vnd.ecip.rlp +application/vnd.ecowin.chart mag +application/vnd.ecowin.filerequest +application/vnd.ecowin.fileupdate +application/vnd.ecowin.series +application/vnd.ecowin.seriesrequest +application/vnd.ecowin.seriesupdate +application/vnd.efi-img +application/vnd.efi-iso +application/vnd.emclient.accessrequest+xml +application/vnd.enliven nml +application/vnd.enphase.envoy +application/vnd.eprints.data+xml +application/vnd.epson.esf esf +application/vnd.epson.msf msf +application/vnd.epson.quickanime qam +application/vnd.epson.salt slt +application/vnd.epson.ssf ssf +application/vnd.ericsson.quickcall qcall qca +application/vnd.espass-espass+zip espass +application/vnd.eszigno3+xml es3 et3 +application/vnd.etsi.aoc+xml +application/vnd.etsi.asic-e+zip asice sce +application/vnd.etsi.asic-s+zip asics +application/vnd.etsi.cug+xml +application/vnd.etsi.iptvcommand+xml +application/vnd.etsi.iptvdiscovery+xml +application/vnd.etsi.iptvprofile+xml +application/vnd.etsi.iptvsad-bc+xml +application/vnd.etsi.iptvsad-cod+xml +application/vnd.etsi.iptvsad-npvr+xml +application/vnd.etsi.iptvservice+xml +application/vnd.etsi.iptvsync+xml +application/vnd.etsi.iptvueprofile+xml +application/vnd.etsi.mcid+xml +application/vnd.etsi.mheg5 +application/vnd.etsi.overload-control-policy-dataset+xml +application/vnd.etsi.pstn+xml +application/vnd.etsi.sci+xml +application/vnd.etsi.simservs+xml +application/vnd.etsi.timestamp-token tst +application/vnd.etsi.tsl.der +application/vnd.etsi.tsl+xml +application/vnd.eudora.data +application/vnd.evolv.ecig.profile ecigprofile +application/vnd.evolv.ecig.settings ecig +application/vnd.evolv.ecig.theme ecigtheme +application/vnd.exstream-empower+zip mpw +application/vnd.exstream-package pub +application/vnd.ezpix-album ez2 +application/vnd.ezpix-package ez3 +application/vnd.fastcopy-disk-image dim +application/vnd.fdf fdf +application/vnd.fdsn.mseed msd mseed +application/vnd.fdsn.seed seed dataless +application/vnd.ffsns +application/vnd.ficlab.flb+zip flb +application/vnd.filmit.zfc zfc +application/vnd.fints +application/vnd.firemonkeys.cloudcell +application/vnd.flographit +application/vnd.FloGraphIt gph +application/vnd.fluxtime.clip ftc +application/vnd.font-fontforge-sfd sfd +application/vnd.framemaker fm +application/vnd.fsc.weblaunch fsc +application/vnd.f-secure.mobile +application/vnd.fujitsu.oasys oas +application/vnd.fujitsu.oasys2 oa2 +application/vnd.fujitsu.oasys3 oa3 +application/vnd.fujitsu.oasysgp fg5 +application/vnd.fujitsu.oasysprs bh2 +application/vnd.fujixerox.ART4 +application/vnd.fujixerox.ART-EX +application/vnd.fujixerox.ddd ddd +application/vnd.fujixerox.docuworks xdw +application/vnd.fujixerox.docuworks.binder xbd +application/vnd.fujixerox.docuworks.container xct +application/vnd.fujixerox.HBPL +application/vnd.fut-misnet +application/vnd.futoin+cbor +application/vnd.futoin+json +application/vnd.fuzzysheet fzs +application/vnd.genomatix.tuxedo txd +application/vnd.gentics.grd+json +application/vnd.geogebra.file ggb +application/vnd.geogebra.tool ggt +application/vnd.geometry-explorer gex gre +application/vnd.geonext gxt +application/vnd.geoplan g2w +application/vnd.geospace g3w +application/vnd.gerber +application/vnd.globalplatform.card-content-mgt +application/vnd.globalplatform.card-content-mgt-response +application/vnd.google-earth.kml+xml kml +application/vnd.google-earth.kmz kmz +application/vnd.gov.sk.e-form+xml +application/vnd.gov.sk.e-form+zip +application/vnd.gov.sk.xmldatacontainer+xml +application/vnd.grafeq gqf gqs +application/vnd.gridmp +application/vnd.groove-account gac +application/vnd.groove-help ghf +application/vnd.groove-identity-message gim +application/vnd.groove-injector grv +application/vnd.groove-tool-message gtm +application/vnd.groove-tool-template tpl +application/vnd.groove-vcard vcg +application/vnd.hal+json +application/vnd.hal+xml hal +application/vnd.HandHeld-Entertainment+xml zmm +application/vnd.hbci hbci hbc kom upa pkd bpd +application/vnd.hc+json +application/vnd.hcl-bireports +application/vnd.hdt hdt +application/vnd.heroku+json +application/vnd.hhe.lesson-player les +application/vnd.hp-HPGL hpgl +application/vnd.hp-hpid hpi hpid +application/vnd.hp-hps hps +application/vnd.hp-jlyt jlt +application/vnd.hp-PCL pcl +application/vnd.hp-PCLXL +application/vnd.httphone +application/vnd.hydrostatix.sof-data sfd-hdstx +application/vnd.hyperdrive+json +application/vnd.hyper-item+json +application/vnd.hyper+json +application/vnd.hzn-3d-crossword +application/vnd.ibm.electronic-media emm +application/vnd.ibm.MiniPay mpy +application/vnd.ibm.rights-management irm +application/vnd.ibm.secure-container sc +application/vnd.iccprofile icc icm +application/vnd.ieee.1905 1905.1 +application/vnd.igloader igl +application/vnd.imagemeter.folder+zip imf +application/vnd.imagemeter.image+zip imi +application/vnd.immervision-ivp ivp +application/vnd.immervision-ivu ivu +application/vnd.ims.imsccv1p1 imscc +application/vnd.ims.imsccv1p2 +application/vnd.ims.imsccv1p3 +application/vnd.ims.lis.v2.result+json +application/vnd.ims.lti.v2.toolconsumerprofile+json +application/vnd.ims.lti.v2.toolproxy.id+json +application/vnd.ims.lti.v2.toolproxy+json +application/vnd.ims.lti.v2.toolsettings+json +application/vnd.ims.lti.v2.toolsettings.simple+json +application/vnd.informedcontrol.rms+xml +application/vnd.infotech.project +application/vnd.infotech.project+xml +application/vnd.innopath.wamp.notification +application/vnd.insors.igm igm +application/vnd.intercon.formnet xpw xpx +application/vnd.intergeo i2g +application/vnd.intertrust.digibox +application/vnd.intertrust.nncp +application/vnd.intu.qbo qbo +application/vnd.intu.qfx qfx +application/vnd.iptc.g2.catalogitem+xml +application/vnd.iptc.g2.conceptitem+xml +application/vnd.iptc.g2.knowledgeitem+xml +application/vnd.iptc.g2.newsitem+xml +application/vnd.iptc.g2.newsmessage+xml +application/vnd.iptc.g2.packageitem+xml +application/vnd.iptc.g2.planningitem+xml +application/vnd.ipunplugged.rcprofile rcprofile +application/vnd.irepository.package+xml irp +application/vnd.isac.fcs fcs +application/vnd.iso11783-10+zip +application/vnd.is-xpr xpr +application/vnd.jam jam +application/vnd.japannet-directory-service +application/vnd.japannet-jpnstore-wakeup +application/vnd.japannet-payment-wakeup +application/vnd.japannet-registration +application/vnd.japannet-registration-wakeup +application/vnd.japannet-setstore-wakeup +application/vnd.japannet-verification +application/vnd.japannet-verification-wakeup +application/vnd.jcp.javame.midlet-rms rms +application/vnd.jisp jisp +application/vnd.joost.joda-archive joda +application/vnd.jsk.isdn-ngn +application/vnd.kahootz ktz ktr +application/vnd.kde.karbon karbon +application/vnd.kde.kchart chrt +application/vnd.kde.kformula kfo +application/vnd.kde.kivio flw +application/vnd.kde.kontour kon +application/vnd.kde.kpresenter kpr kpt +application/vnd.kde.kspread ksp +application/vnd.kde.kword kwd kwt +application/vnd.kenameaapp htke +application/vnd.kidspiration kia +application/vnd.Kinar kne knp sdf +application/vnd.koan skp skd skm skt +application/vnd.kodak-descriptor sse +application/vnd.las.las+json lasjson +application/vnd.las.las+xml lasxml +application/vnd.laszip +application/vnd.leap+json +application/vnd.liberty-request+xml +application/vnd.llamagraphics.life-balance.desktop lbd +application/vnd.llamagraphics.life-balance.exchange+xml lbe +application/vnd.logipipe.circuit+zip lcs lca +application/vnd.loom loom +application/vnd.lotus-1-2-3 123 wk4 wk3 wk1 +application/vnd.lotus-approach apr vew +application/vnd.lotus-freelance prz pre +application/vnd.lotus-notes nsf ntf ndl ns4 ns3 ns2 nsh nsg +application/vnd.lotus-organizer or3 or2 org +application/vnd.lotus-screencam scm +application/vnd.lotus-wordpro lwp sam +application/vnd.macports.portpkg portpkg +application/vnd.mapbox-vector-tile mvt +application/vnd.marlin.drm.actiontoken+xml +application/vnd.marlin.drm.conftoken+xml +application/vnd.marlin.drm.license+xml +application/vnd.marlin.drm.mdcf mdc +application/vnd.mason+json +application/vnd.maxmind.maxmind-db mmdb +application/vnd.mcd mcd +application/vnd.medcalcdata mc1 +application/vnd.mediastation.cdkey cdkey +application/vnd.meridian-slingshot +application/vnd.MFER mwf +application/vnd.mfmp mfm +application/vnd.micrografx.flo flo +application/vnd.micrografx.igx igx +application/vnd.micro+json +application/vnd.microsoft.portable-executable +application/vnd.microsoft.windows.thumbnail-cache +application/vnd.miele+json +application/vnd.mif mif +application/vnd.minisoft-hp3000-save +application/vnd.mitsubishi.misty-guard.trustweb +application/vnd.mobius.daf +application/vnd.Mobius.DAF daf +application/vnd.mobius.dis +application/vnd.Mobius.DIS dis +application/vnd.Mobius.MBK mbk +application/vnd.Mobius.MQY mqy +application/vnd.mobius.msl +application/vnd.Mobius.MSL msl +application/vnd.mobius.plc +application/vnd.Mobius.PLC plc +application/vnd.mobius.txf +application/vnd.Mobius.TXF txf +application/vnd.mophun.application mpn +application/vnd.mophun.certificate mpc +application/vnd.motorola.flexsuite +application/vnd.motorola.flexsuite.adsi +application/vnd.motorola.flexsuite.fis +application/vnd.motorola.flexsuite.gotap +application/vnd.motorola.flexsuite.kmr +application/vnd.motorola.flexsuite.ttc +application/vnd.motorola.flexsuite.wem +application/vnd.motorola.iprm +application/vnd.mozilla.xul+xml xul +application/vnd.ms-3mfdocument 3mf +application/vnd.msa-disk-image msa +application/vnd.ms-artgalry cil +application/vnd.ms-asf asf +application/vnd.ms-cab-compressed cab +application/vnd.mseq mseq +application/vnd.ms-excel xls xlm xla xlc xlt xlw +application/vnd.ms-excel.addin.macroEnabled.12 xlam +application/vnd.ms-excel.sheet.binary.macroEnabled.12 xlsb +application/vnd.ms-excel.sheet.macroEnabled.12 xlsm +application/vnd.ms-excel.template.macroEnabled.12 xltm +application/vnd.ms-fontobject eot +application/vnd.ms-htmlhelp chm +application/vnd.msign +application/vnd.ms-ims ims +application/vnd.ms-lrm lrm +application/vnd.ms-office.activeX+xml +application/vnd.ms-officetheme thmx +application/vnd.ms-pki.seccat cat +#application/vnd.ms-pki.stl stl +application/vnd.ms-playready.initiator+xml +application/vnd.ms-powerpoint ppt pps +application/vnd.ms-powerpoint.addin.macroEnabled.12 ppam +application/vnd.ms-powerpoint.presentation.macroEnabled.12 pptm +application/vnd.ms-powerpoint.slide.macroEnabled.12 sldm +application/vnd.ms-powerpoint.slideshow.macroEnabled.12 ppsm +application/vnd.ms-powerpoint.template.macroEnabled.12 potm +application/vnd.ms-PrintDeviceCapabilities+xml +application/vnd.ms-PrintSchemaTicket+xml +application/vnd.ms-project mpp mpt +application/vnd.ms-tnef tnef tnf +application/vnd.ms-windows.devicepairing +application/vnd.ms-windows.nwprinting.oob +application/vnd.ms-windows.printerpairing +application/vnd.ms-windows.wsd.oob +application/vnd.ms-wmdrm.lic-chlg-req +application/vnd.ms-wmdrm.lic-resp +application/vnd.ms-wmdrm.meter-chlg-req +application/vnd.ms-wmdrm.meter-resp +application/vnd.ms-word.document.macroEnabled.12 docm +application/vnd.ms-word.template.macroEnabled.12 dotm +application/vnd.ms-works wcm wdb wks wps +application/vnd.ms-wpl wpl +application/vnd.ms-xpsdocument xps +application/vnd.multiad.creator crtr +application/vnd.multiad.creator.cif cif +application/vnd.musician mus +application/vnd.music-niff +application/vnd.muvee.style msty +application/vnd.mynfc taglet +application/vnd.ncd.control +application/vnd.ncd.reference +application/vnd.nearst.inv+json +application/vnd.nervana entity request bkm kcm +application/vnd.netfpx +application/vnd.neurolanguage.nlu nlu +application/vnd.nimn nimn +application/vnd.nintendo.nitro.rom nds +application/vnd.nintendo.snes.rom sfc smc +application/vnd.nitf nitf +application/vnd.noblenet-directory nnd +application/vnd.noblenet-sealer nns +application/vnd.noblenet-web nnw +application/vnd.nokia.catalogs +application/vnd.nokia.conml+wbxml +application/vnd.nokia.conml+xml +application/vnd.nokia.iptv.config+xml +application/vnd.nokia.iSDS-radio-presets +application/vnd.nokia.landmarkcollection+xml +application/vnd.nokia.landmark+wbxml +application/vnd.nokia.landmark+xml +application/vnd.nokia.ncd +application/vnd.nokia.n-gage.ac+xml +application/vnd.nokia.n-gage.data ngdat +application/vnd.nokia.pcd+wbxml +application/vnd.nokia.pcd+xml +application/vnd.nokia.radio-preset rpst +application/vnd.nokia.radio-presets rpss +application/vnd.novadigm.EDM edm +application/vnd.novadigm.EDX edx +application/vnd.novadigm.EXT ext +application/vnd.ntt-local.content-share +application/vnd.ntt-local.file-transfer +application/vnd.ntt-local.ogw_remote-access +application/vnd.ntt-local.sip-ta_remote +application/vnd.ntt-local.sip-ta_tcp_stream +application/vnd.oasis.opendocument.chart odc +application/vnd.oasis.opendocument.chart-template otc +application/vnd.oasis.opendocument.database odb +application/vnd.oasis.opendocument.formula odf +application/vnd.oasis.opendocument.formula-template +application/vnd.oasis.opendocument.graphics odg +application/vnd.oasis.opendocument.graphics-template otg +application/vnd.oasis.opendocument.image odi +application/vnd.oasis.opendocument.image-template oti +application/vnd.oasis.opendocument.presentation odp +application/vnd.oasis.opendocument.presentation-template otp +application/vnd.oasis.opendocument.spreadsheet ods +application/vnd.oasis.opendocument.spreadsheet-template ots +application/vnd.oasis.opendocument.text odt +application/vnd.oasis.opendocument.text-master odm +application/vnd.oasis.opendocument.text-template ott +application/vnd.oasis.opendocument.text-web oth +application/vnd.obn +application/vnd.ocf+cbor +application/vnd.oci.image.manifest.v1+json +application/vnd.oftn.l10n+json +application/vnd.oipf.contentaccessdownload+xml +application/vnd.oipf.contentaccessstreaming+xml +application/vnd.oipf.cspg-hexbinary +application/vnd.oipf.dae.svg+xml +application/vnd.oipf.dae.xhtml+xml +application/vnd.oipf.mippvcontrolmessage+xml +application/vnd.oipf.pae.gem +application/vnd.oipf.spdiscovery+xml +application/vnd.oipf.spdlist+xml +application/vnd.oipf.ueprofile+xml +application/vnd.oipf.userprofile+xml +application/vnd.olpc-sugar xo +application/vnd.oma.bcast.associated-procedure-parameter+xml +application/vnd.oma.bcast.drm-trigger+xml +application/vnd.oma.bcast.imd+xml +application/vnd.oma.bcast.ltkm +application/vnd.oma.bcast.notification+xml +application/vnd.oma.bcast.provisioningtrigger +application/vnd.oma.bcast.sgboot +application/vnd.oma.bcast.sgdd+xml +application/vnd.oma.bcast.sgdu +application/vnd.oma.bcast.simple-symbol-container +application/vnd.oma.bcast.smartcard-trigger+xml +application/vnd.oma.bcast.sprov+xml +application/vnd.oma.bcast.stkm +application/vnd.oma.cab-address-book+xml +application/vnd.oma.cab-feature-handler+xml +application/vnd.oma.cab-pcc+xml +application/vnd.oma.cab-subs-invite+xml +application/vnd.oma.cab-user-prefs+xml +application/vnd.oma.dcd +application/vnd.oma.dcdc +application/vnd.oma.dd2+xml dd2 +application/vnd.oma.drm.risd+xml +application/vnd.omads-email+xml +application/vnd.omads-file+xml +application/vnd.omads-folder+xml +application/vnd.oma.group-usage-list+xml +application/vnd.omaloc-supl-init +application/vnd.oma.lwm2m+json +application/vnd.oma.lwm2m+tlv +application/vnd.oma.pal+xml +application/vnd.oma.poc.detailed-progress-report+xml +application/vnd.oma.poc.final-report+xml +application/vnd.oma.poc.groups+xml +application/vnd.oma.poc.invocation-descriptor+xml +application/vnd.oma.poc.optimized-progress-report+xml +application/vnd.oma.push +application/vnd.oma.scidm.messages+xml +application/vnd.oma-scws-config +application/vnd.oma-scws-http-request +application/vnd.oma-scws-http-response +application/vnd.oma.xcap-directory+xml +application/vnd.onepager tam +application/vnd.onepagertamp tamp +application/vnd.onepagertamx tamx +application/vnd.onepagertat tat +application/vnd.onepagertatp tatp +application/vnd.onepagertatx tatx +application/vnd.openblox.game-binary obg +application/vnd.openblox.game+xml obgx +application/vnd.openeye.oeb oeb +application/vnd.openofficeorg.extension oxt +application/vnd.openstreetmap.data+xml osm +application/vnd.openxmlformats-officedocument.custom-properties+xml +application/vnd.openxmlformats-officedocument.customXmlProperties+xml +application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml +application/vnd.openxmlformats-officedocument.drawingml.chart+xml +application/vnd.openxmlformats-officedocument.drawingml.diagramColors+xml +application/vnd.openxmlformats-officedocument.drawingml.diagramData+xml +application/vnd.openxmlformats-officedocument.drawingml.diagramLayout+xml +application/vnd.openxmlformats-officedocument.drawingml.diagramStyle+xml +application/vnd.openxmlformats-officedocument.drawing+xml +application/vnd.openxmlformats-officedocument.extended-properties+xml +application/vnd.openxmlformats-officedocument.presentationml.commentAuthors+xml +application/vnd.openxmlformats-officedocument.presentationml.comments+xml +application/vnd.openxmlformats-officedocument.presentationml.handoutMaster+xml +application/vnd.openxmlformats-officedocument.presentationml.notesMaster+xml +application/vnd.openxmlformats-officedocument.presentationml.notesSlide+xml +application/vnd.openxmlformats-officedocument.presentationml.presentation pptx +application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml +application/vnd.openxmlformats-officedocument.presentationml.presProps+xml +application/vnd.openxmlformats-officedocument.presentationml.slide sldx +application/vnd.openxmlformats-officedocument.presentationml.slideLayout+xml +application/vnd.openxmlformats-officedocument.presentationml.slideMaster+xml +application/vnd.openxmlformats-officedocument.presentationml.slideshow ppsx +application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml +application/vnd.openxmlformats-officedocument.presentationml.slideUpdateInfo+xml +application/vnd.openxmlformats-officedocument.presentationml.slide+xml +application/vnd.openxmlformats-officedocument.presentationml.tableStyles+xml +application/vnd.openxmlformats-officedocument.presentationml.tags+xml +application/vnd.openxmlformats-officedocument.presentationml.template potx +application/vnd.openxmlformats-officedocument.presentationml.template.main+xml +application/vnd.openxmlformats-officedocument.presentationml.viewProps+xml +application/vnd.openxmlformats-officedocument.spreadsheetml.calcChain+xml +application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml +application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml +application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml +application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml +application/vnd.openxmlformats-officedocument.spreadsheetml.externalLink+xml +application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheDefinition+xml +application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheRecords+xml +application/vnd.openxmlformats-officedocument.spreadsheetml.pivotTable+xml +application/vnd.openxmlformats-officedocument.spreadsheetml.queryTable+xml +application/vnd.openxmlformats-officedocument.spreadsheetml.revisionHeaders+xml +application/vnd.openxmlformats-officedocument.spreadsheetml.revisionLog+xml +application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml +application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx +application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml +application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml +application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml +application/vnd.openxmlformats-officedocument.spreadsheetml.tableSingleCells+xml +application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml +application/vnd.openxmlformats-officedocument.spreadsheetml.template xltx +application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml +application/vnd.openxmlformats-officedocument.spreadsheetml.userNames+xml +application/vnd.openxmlformats-officedocument.spreadsheetml.volatileDependencies+xml +application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml +application/vnd.openxmlformats-officedocument.themeOverride+xml +application/vnd.openxmlformats-officedocument.theme+xml +application/vnd.openxmlformats-officedocument.vmlDrawing +application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml +application/vnd.openxmlformats-officedocument.wordprocessingml.document docx +application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml +application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml +application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml +application/vnd.openxmlformats-officedocument.wordprocessingml.fontTable+xml +application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml +application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml +application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml +application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml +application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml +application/vnd.openxmlformats-officedocument.wordprocessingml.template dotx +application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml +application/vnd.openxmlformats-officedocument.wordprocessingml.webSettings+xml +application/vnd.openxmlformats-package.core-properties+xml +application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml +application/vnd.openxmlformats-package.relationships+xml +application/vnd.oracle.resource+json +application/vnd.orange.indata +application/vnd.osa.netdeploy ndc +application/vnd.osgeo.mapguide.package mgp +application/vnd.osgi.bundle +application/vnd.osgi.dp dp +application/vnd.osgi.subsystem esa +application/vnd.otps.ct-kip+xml +application/vnd.oxli.countgraph oxlicg +application/vnd.pagerduty+json +application/vnd.palm prc pdb pqa oprc +application/vnd.panoply plp +application/vnd.paos+xml +application/vnd.patentdive dive +application/vnd.patientecommsdoc +application/vnd.pawaafile paw +application/vnd.pcos +application/vnd.pg.format str +application/vnd.pg.osasli ei6 +application/vnd.piaccess.application-license pil +application/vnd.picsel efif +application/vnd.pmi.widget wg +application/vnd.poc.group-advertisement+xml +application/vnd.pocketlearn plf +application/vnd.powerbuilder6 pbd +application/vnd.powerbuilder6-s +application/vnd.powerbuilder7 +application/vnd.powerbuilder75 +application/vnd.powerbuilder75-s +application/vnd.powerbuilder7-s +application/vnd.preminet preminet +application/vnd.previewsystems.box box vbox +application/vnd.proteus.magazine mgz +application/vnd.psfs psfs +application/vnd.publishare-delta-tree qps +application/vnd.pvi.ptid1 ptid +application/vnd.pwg-multiplexed +application/vnd.pwg-xhtml-print+xml +application/vnd.qualcomm.brew-app-res bar +application/vnd.quarantainenet +application/vnd.Quark.QuarkXPress qxd qxt qwd qwt qxl qxb +application/vnd.quobject-quoxdocument quox quiz +application/vnd.radisys.moml+xml +application/vnd.radisys.msml-audit-conf+xml +application/vnd.radisys.msml-audit-conn+xml +application/vnd.radisys.msml-audit-dialog+xml +application/vnd.radisys.msml-audit-stream+xml +application/vnd.radisys.msml-audit+xml +application/vnd.radisys.msml-conf+xml +application/vnd.radisys.msml-dialog-base+xml +application/vnd.radisys.msml-dialog-fax-detect+xml +application/vnd.radisys.msml-dialog-fax-sendrecv+xml +application/vnd.radisys.msml-dialog-group+xml +application/vnd.radisys.msml-dialog-speech+xml +application/vnd.radisys.msml-dialog-transform+xml +application/vnd.radisys.msml-dialog+xml +application/vnd.radisys.msml+xml +application/vnd.rainstor.data tree +application/vnd.rapid +application/vnd.rar rar +application/vnd.realvnc.bed bed +application/vnd.recordare.musicxml mxl +application/vnd.recordare.musicxml+xml +application/vnd.RenLearn.rlprint +application/vnd.restful+json +application/vnd.rig.cryptonote cryptonote +application/vnd.rim.cod cod +application/vnd.route66.link66+xml link66 +application/vnd.rs-274x +application/vnd.ruckus.download +application/vnd.s3sms +application/vnd.sailingtracker.track st +application/vnd.sar SAR +application/vnd.sbm.cid +application/vnd.sbm.mid2 +application/vnd.scribus scd sla slaz +application/vnd.sealed.3df s3df +application/vnd.sealed.csf scsf +application/vnd.sealed.doc sdoc sdo s1w +application/vnd.sealed.eml seml sem +application/vnd.sealedmedia.softseal.html stml s1h +application/vnd.sealedmedia.softseal.pdf spdf spd s1a +application/vnd.sealed.mht smht smh +application/vnd.sealed.net +application/vnd.sealed.ppt sppt s1p +application/vnd.sealed.tiff stif +application/vnd.sealed.xls sxls sxl s1e +application/vnd.seemail see +application/vnd.sema sema +application/vnd.semd semd +application/vnd.semf semf +application/vnd.shade-save-file ssv +application/vnd.shana.informed.formdata ifm +application/vnd.shana.informed.formtemplate itp +application/vnd.shana.informed.interchange iif +application/vnd.shana.informed.package ipk +application/vnd.shootproof+json +application/vnd.shopkick+json +application/vnd.shp shp +application/vnd.shx shx +application/vnd.sigrok.session sr +application/vnd.SimTech-MindMapper twd twds +application/vnd.siren+json +application/vnd.smaf mmf +application/vnd.smart.notebook notebook +application/vnd.smart.teacher teacher +application/vnd.snesdev-page-table ptrom pt +application/vnd.software602.filler.form+xml fo +application/vnd.software602.filler.form-xml-zip zfo +application/vnd.solent.sdkm+xml sdkm sdkd +application/vnd.spotfire.dxp dxp +application/vnd.spotfire.sfs sfs +application/vnd.sqlite3 sqlite sqlite3 +application/vnd.sss-cod +application/vnd.sss-dtf +application/vnd.sss-ntf +application/vnd.stardivision.calc sdc +application/vnd.stardivision.chart sds +application/vnd.stardivision.draw sda +application/vnd.stardivision.impress sdd +application/vnd.stardivision.math +application/vnd.stardivision.writer sdw +application/vnd.stardivision.writer-global sgl +application/vnd.stepmania.package smzip +application/vnd.stepmania.stepchart sm +application/vnd.street-stream +application/vnd.sun.wadl+xml wadl +application/vnd.sun.xml.calc sxc +application/vnd.sun.xml.calc.template stc +application/vnd.sun.xml.draw sxd +application/vnd.sun.xml.draw.template std +application/vnd.sun.xml.impress sxi +application/vnd.sun.xml.impress.template sti +application/vnd.sun.xml.math sxm +application/vnd.sun.xml.writer sxw +application/vnd.sun.xml.writer.global sxg +application/vnd.sun.xml.writer.template stw +application/vnd.sus-calendar sus susp +application/vnd.svd +application/vnd.swiftview-ics +application/vnd.symbian.install sis +application/vnd.syncml.dmddf+wbxml +application/vnd.syncml.dmddf+xml ddf +application/vnd.syncml.dm.notification +application/vnd.syncml.dmtnds+wbxml +application/vnd.syncml.dmtnds+xml +application/vnd.syncml.dm+wbxml bdm +application/vnd.syncml.dm+xml xdm +application/vnd.syncml.ds.notification +application/vnd.syncml+xml xsm +application/vnd.tableschema+json +application/vnd.tao.intent-module-archive tao +application/vnd.tcpdump.pcap pcap cap dmp +application/vnd.theqvd qvd +application/vnd.think-cell.ppttc+json ppttc +application/vnd.tmd.mediaflex.api+xml +application/vnd.tml vfr viaframe +application/vnd.tmobile-livetv tmo +application/vnd.trid.tpt tpt +application/vnd.tri.onesource +application/vnd.triscape.mxs mxs +application/vnd.trueapp tra +application/vnd.truedoc +application/vnd.tve-trigger +application/vnd.ubisoft.webplayer +application/vnd.ufdl ufdl ufd frm +application/vnd.uiq.theme utz +application/vnd.umajin umj +application/vnd.unity unityweb +application/vnd.uoml+xml uoml uo +application/vnd.uplanet.alert +application/vnd.uplanet.alert-wbxml +application/vnd.uplanet.bearer-choice +application/vnd.uplanet.bearer-choice-wbxml +application/vnd.uplanet.cacheop +application/vnd.uplanet.cacheop-wbxml +application/vnd.uplanet.channel +application/vnd.uplanet.channel-wbxml +application/vnd.uplanet.list +application/vnd.uplanet.listcmd +application/vnd.uplanet.listcmd-wbxml +application/vnd.uplanet.list-wbxml +application/vnd.uplanet.signal +application/vnd.uri-map urim urimap +application/vnd.valve.source.material vmt +application/vnd.vcx vcx +application/vnd.vd-study mxi study-inter model-inter +application/vnd.vectorworks vwx +application/vnd.vel+json +application/vnd.verimatrix.vcas +application/vnd.veryant.thin istc isws +application/vnd.ves.encrypted VES +application/vnd.vidsoft.vidconference vsc +application/vnd.visio vsd vst vsw vss +application/vnd.visionary vis +application/vnd.vividence.scriptfile +application/vnd.vsf vsf +application/vnd.wap.sic sic +application/vnd.wap.slc slc +application/vnd.wap.wbxml wbxml +application/vnd.wap.wmlc wmlc +application/vnd.wap.wmlscriptc wmlsc +application/vnd.webturbo wtb +application/vnd.wfa.p2p p2p +application/vnd.wfa.wsc wsc +application/vnd.windows.devicepairing +application/vnd.wmc wmc +application/vnd.wmf.bootstrap +application/vnd.wolfram.mathematica nb +application/vnd.wolfram.mathematica.package m +application/vnd.wolfram.player nbp +application/vnd.wordperfect wpd +application/vnd.wordperfect5.1 wp5 +application/vnd.wqd wqd +application/vnd.wrq-hp3000-labelled +application/vnd.wt.stf stf +application/vnd.wv.csp+wbxml wv +application/vnd.wv.csp+xml +application/vnd.wv.ssp+xml +application/vnd.xacml+json +application/vnd.xara xar +application/vnd.xfdl xfdl xfd +application/vnd.xfdl.webform +application/vnd.xmi+xml +application/vnd.xmpie.cpkg cpkg +application/vnd.xmpie.dpkg dpkg +application/vnd.xmpie.plan +application/vnd.xmpie.ppkg ppkg +application/vnd.xmpie.xlim xlim +application/vnd.yamaha.hv-dic hvd +application/vnd.yamaha.hv-script hvs +application/vnd.yamaha.hv-voice hvp +application/vnd.yamaha.openscoreformat osf +application/vnd.yamaha.openscoreformat.osfpvg+xml +application/vnd.yamaha.remote-setup +application/vnd.yamaha.smaf-audio saf +application/vnd.yamaha.smaf-phrase spf +application/vnd.yamaha.through-ngn +application/vnd.yamaha.tunnel-udpencap +application/vnd.yaoweme yme +application/vnd.yellowriver-custom-menu cmp +application/vnd.zul zir zirz +application/vnd.zzazz.deck+xml zaz +application/voicexml+xml vxml +application/voucher-cms+json vcj +application/vq-rtcp-xr +application/wasm wasm +application/watcherinfo+xml wif +application/webpush-options+json +application/whoispp-query +application/whoispp-response +application/widget wgt +application/wita +application/wordperfect5.1 +application/wsdl+xml wsdl +application/wspolicy+xml wspolicy +application/x-123 wk +application/x400-bp +application/x-7z-compressed 7z +application/x-abiword abw +application/xacml+xml +application/x-apple-diskimage dmg +application/x-bcpio bcpio +application/x-bittorrent torrent +application/xcap-att+xml xav +application/xcap-caps+xml xca +application/xcap-diff+xml xdf +application/xcap-el+xml xel +application/xcap-error+xml xer +application/xcap-ns+xml xns +application/x-cdf cdf cda +application/x-cdlink vcd +application/x-comsol mph +application/xcon-conference-info-diff+xml +application/xcon-conference-info+xml +application/x-core +application/x-cpio cpio +application/x-csh csh +application/x-director dcr dir dxr +application/x-doom wad +application/x-dvi dvi +application/xenc+xml +application/x-executable +application/x-font pfa pfb gsf +application/x-font-pcf pcf pcf.Z +application/x-freemind mm +application/x-ganttproject gan +application/x-gnumeric gnumeric +application/x-go-sgf sgf +application/x-graphing-calculator gcf +application/x-gtar gtar +application/x-gtar-compressed tgz taz +application/x-hdf hdf +application/xhtml+xml xhtml xhtm xht + +#application/x-httpd-eruby rhtml +#application/x-httpd-php phtml pht php +#application/x-httpd-php3 php3 +#application/x-httpd-php3-preprocessed php3p +#application/x-httpd-php4 php4 +#application/x-httpd-php5 php5 +#application/x-httpd-php-source phps + +application/x-hwp hwp +application/x-ica ica +application/x-info info +application/x-internet-signup ins isp +application/x-iphone iii +application/x-iso9660-image iso +application/x-java-applet +application/x-java-bean +application/x-java-jnlp-file jnlp +application/x-jmol jmz +application/x-kdelnk +application/x-killustrator kil +application/x-latex latex +application/x-lha lha +application/xliff+xml xlf +application/x-lyx lyx +application/x-lzh lzh +application/x-lzx lzx +application/x-maker frm maker frame fm fb book fbdoc +application/xml xml +application/xml-dtd dtd mod +application/xml-external-parsed-entity ent +application/xml-patch+xml +application/xmpp+xml +application/x-ms-application application +application/x-msdos-program com exe bat dll +application/x-msi msi +application/x-ms-manifest manifest +application/x-ms-wmd wmd +application/x-ms-wmz wmz +application/x-netcdf nc +application/x-ns-proxy-autoconfig pac +application/x-nwc nwc +application/x-object o +application/xop+xml xop +application/x-oz-application oza +application/x-pkcs7-certreqresp p7r +application/x-pki-message +application/x-python-code pyc pyo +application/x-qgis qgs shp shx +application/x-quicktimeplayer qtl +application/x-rdp rdp +application/x-redhat-package-manager rpm +application/x-rss+xml rss +application/x-ruby rb +application/x-rx +application/x-scilab sci sce +application/x-scilab-xcos xcos +application/x-sh sh +application/x-shar shar +application/x-shellscript +application/x-silverlight scr +application/xslt+xml xsl xslt +application/xspf+xml xspf +application/x-stuffit sit sitx +application/x-sv4cpio sv4cpio +application/x-sv4crc sv4crc +application/x-tar tar +application/x-tcl tcl +application/x-tex-gf gf +application/x-texinfo texinfo texi +application/x-tex-pk pk +application/x-trash ~ % bak old sik +application/x-troff-man man +application/x-troff-me me +application/x-troff-ms ms +application/x-ustar ustar +application/x-videolan +application/xv+xml mxml xhvml xvml xvm +application/x-wais-source src +application/x-wingz wz +application/x-www-form-urlencoded +application/x-x509-ca-cert crt +application/x-x509-ca-ra-cert +application/x-x509-next-ca-cert +application/x-xcf xcf +application/x-xfig fig +application/x-xpinstall xpi +application/x-xz xz +application/yang yang +application/yang-data+json +application/yang-data+xml +application/yang-patch+json +application/yang-patch+xml +application/yin+xml yin +application/zip zip +application/zlib +application/zstd zst + +audio/1d-interleaved-parityfec +audio/32kadpcm 726 +audio/3gpp +audio/3gpp2 +audio/aac adts aac ass +audio/ac3 ac3 +audio/AMR amr AMR +audio/AMR-WB awb AWB +audio/amr-wb+ +audio/annodex axa +audio/aptx +audio/asc acn +audio/ATRAC3 at3 aa3 omg +audio/ATRAC-ADVANCED-LOSSLESS aal +audio/ATRAC-X atx +audio/basic au snd +audio/BV16 +audio/BV32 +audio/clearmode +audio/CN +audio/csound csd orc sco +audio/DAT12 +audio/dls dls +audio/dsr-es201108 +audio/dsr-es202050 +audio/dsr-es202211 +audio/dsr-es202212 +audio/DV +audio/DVI4 +audio/eac3 +audio/encaprtp +audio/EVRC evc +audio/EVRC-QCP qcp QCP +audio/EVRC0 +audio/EVRC1 +audio/EVRCB evb +audio/EVRCB0 +audio/EVRCB1 +audio/EVRCNW enw +audio/EVRCNW0 +audio/EVRCNW1 +audio/EVRC-QCP +audio/EVRCWB evw +audio/EVRCWB0 +audio/EVRCWB1 +audio/EVS +audio/example +audio/flac flac +audio/flexfec +audio/fwdred +audio/G711-0 +audio/G719 +audio/G722 +audio/g.722.1 +audio/G7221 +audio/G723 +audio/G726-16 +audio/G726-24 +audio/G726-32 +audio/G726-40 +audio/G728 +audio/G729 +audio/G7291 +audio/G729D +audio/G729E +audio/GSM +audio/GSM-EFR +audio/GSM-HR-08 +audio/iLBC lbc +audio/ip-mr_v2.5 +audio/L16 l16 +audio/L20 +audio/L24 +audio/L8 +audio/LPC +audio/MELP +audio/MELP1200 +audio/MELP2400 +audio/MELP600 +audio/mhas mhas +audio/mobile-xmf mxmf +audio/mp4 +audio/mp4a-latm +audio/MP4A-LATM +audio/MPA +audio/mpa-robust +audio/mpeg mpga mpega mp1 mp2 mp3 m4a +audio/mpeg4-generic +audio/mpegurl m3u +audio/ogg oga ogg opus spx +audio/opus +audio/parityfec +audio/PCMA +audio/PCMA-WB +audio/PCMU +audio/PCMU-WB +audio/prs.sid sid psid +audio/qcelp +audio/raptorfec +audio/RED +audio/rtp-enc-aescm128 +audio/rtploopback +audio/rtp-midi +audio/rtx +audio/SMV smv +audio/SMV0 +audio/SMV-QCP +audio/sofa sofa +audio/speex +audio/sp-midi mid +audio/t140c +audio/t38 +audio/telephone-event +audio/TETRA_ACELP +audio/TETRA_ACELP_BB +audio/tone +audio/TSVCIS +audio/UEMCLIP +audio/ulpfec +audio/usac loas xhe +audio/VDVI +audio/VMR-WB +audio/vnd.3gpp.iufp +audio/vnd.4SB +audio/vnd.audiokoz koz +audio/vnd.CELP +audio/vnd.cisco.nse +audio/vnd.cmles.radio-events +audio/vnd.cns.anp1 +audio/vnd.cns.inf1 +audio/vnd.dece.audio uva uvva +audio/vnd.digital-winds eol +audio/vnd.dlna.adts +audio/vnd.dolby.heaac.1 +audio/vnd.dolby.heaac.2 +audio/vnd.dolby.mlp mlp +audio/vnd.dolby.mps +audio/vnd.dolby.pl2 +audio/vnd.dolby.pl2x +audio/vnd.dolby.pl2z +audio/vnd.dolby.pulse.1 +audio/vnd.dra +audio/vnd.dts dts +audio/vnd.dts.hd dtshd +audio/vnd.dts.uhd +audio/vnd.dvb.file +audio/vnd.everad.plj plj +audio/vnd.hns.audio +audio/vnd.lucent.voice lvp +audio/vnd.ms-playready.media.pya pya +audio/vnd.nokia.mobile-xmf +audio/vnd.nortel.vbk vbk +audio/vnd.nuera.ecelp4800 ecelp4800 +audio/vnd.nuera.ecelp7470 ecelp7470 +audio/vnd.nuera.ecelp9600 ecelp9600 +audio/vnd.octel.sbc +audio/vnd.presonus.multitrack multitrack +audio/vnd.rhetorex.32kadpcm +audio/vnd.rip rip +audio/vnd.sealedmedia.softseal.mpeg smp3 smp s1m +audio/vnd.vmx.cvsd +audio/vorbis +audio/vorbis-config +audio/x-aiff aif aiff aifc +audio/x-gsm gsm +audio/x-ms-wax wax +audio/x-ms-wma wma +audio/x-pn-realaudio ra rm ram +audio/x-pn-realaudio-plugin +audio/x-scpls pls +audio/x-sd2 sd2 +audio/x-wav wav + +chemical/x-alchemy alc +chemical/x-cache cac cache +chemical/x-cache-csf csf +chemical/x-cactvs-binary cbin cascii ctab +chemical/x-cdx cdx +chemical/x-cerius +chemical/x-chem3d c3d +chemical/x-chemdraw chm +chemical/x-cif cif +chemical/x-cmdf cmdf +chemical/x-cml cml +chemical/x-compass cpa +chemical/x-crossfire bsd +chemical/x-csml csml csm +chemical/x-ctx ctx +chemical/x-cxf cxf cef +#chemical/x-daylight-smiles smi +chemical/x-embl-dl-nucleotide emb embl +chemical/x-galactic-spc spc +chemical/x-gamess-input inp gam gamin +chemical/x-gaussian-checkpoint fch fchk +chemical/x-gaussian-cube cub +chemical/x-gaussian-input gau gjc gjf +chemical/x-gaussian-log gal +chemical/x-gcg8-sequence gcg +chemical/x-genbank gen +chemical/x-hin hin +chemical/x-isostar istr ist +chemical/x-jcamp-dx jdx dx +chemical/x-kinemage kin +chemical/x-macmolecule mcm +chemical/x-macromodel-input mmod +chemical/x-mdl-molfile mol +chemical/x-mdl-rdfile rd +chemical/x-mdl-rxnfile rxn +chemical/x-mdl-sdfile sd sdf +chemical/x-mdl-tgf tgf +#chemical/x-mif mif +chemical/x-mmcif mcif +chemical/x-mol2 mol2 +chemical/x-molconn-Z b +chemical/x-mopac-graph gpt +chemical/x-mopac-input mop mopcrt mpc zmt +chemical/x-mopac-out moo +chemical/x-mopac-vib mvb +chemical/x-ncbi-asn1 asn +chemical/x-ncbi-asn1-ascii prt +chemical/x-ncbi-asn1-binary val aso +chemical/x-ncbi-asn1-spec asn +chemical/x-pdb pdb +chemical/x-rosdal ros +chemical/x-swissprot sw +chemical/x-vamas-iso14976 vms +chemical/x-vmd vmd +chemical/x-xtel xtel +chemical/x-xyz xyz + +font/collection ttc +font/otf otf +font/sfnt +font/ttf ttf +font/woff woff +font/woff2 woff2 + +image/aces exr +image/avci avci +image/avcs avcs +image/bmp bmp +image/cgm cgm +image/dicom-rle drle +image/emf emf +image/example +image/fits fits fit fts +image/g3fax +image/gif gif +image/heic heic +image/heic-sequence heics +image/heif heif +image/heif-sequence heifs +image/hej2k hej2 +image/hsj2 hsj2 +image/ief ief +image/jls jls +image/jp2 jp2 jpg2 +image/jpeg jpeg jpg jpe jfif +image/jph jph +image/jphc jhc jphc +image/jpm jpm jpgm +image/jpx jpx jpf +image/jxr jxr +image/jxrA jxra +image/jxrS jxrs +image/jxs jxs +image/jxsc jxsc +image/jxsi jxsi +image/jxss jxss +image/ktx ktx +image/ktx2 ktx2 +image/naplps +image/png png +image/prs.btif btif btf +image/prs.pti pti +image/pwg-raster +image/svg+xml svg svgz +image/t38 t38 T38 +image/tiff tiff tif +image/tiff-fx tfx +image/vnd.adobe.photoshop psd +image/vnd.airzip.accelerator.azv azv +image/vnd.cns.inf2 +image/vnd.dece.graphic uvi uvvi uvg uvvg +image/vnd.djvu djvu djv +image/vnd.dvb.subtitle +image/vnd.dwg dwg +image/vnd.dxf dxf +image/vnd.fastbidsheet fbs +image/vnd.fpx fpx +image/vnd.fst fst +image/vnd.fujixerox.edmics-mmr mmr +image/vnd.fujixerox.edmics-rlc rlc +image/vnd.globalgraphics.pgb PGB pgb +image/vnd.microsoft.icon ico +image/vnd.mix +image/vnd.mozilla.apng apng +image/vnd.ms-modi mdi +image/vnd.net-fpx +image/vnd.pco.b16 b16 +image/vnd.radiance hdr rgbe xyze +image/vnd.sealedmedia.softseal.gif sgif sgi s1g +image/vnd.sealedmedia.softseal.jpg sjpg sjp s1j +image/vnd.sealed.png spng spn s1n +image/vnd.svf +image/vnd.tencent.tap tap +image/vnd.valve.source.texture vtf +image/vnd.wap.wbmp wbmp +image/vnd.xiff xif +image/vnd.zbrush.pcx pcx +image/wmf wmf +image/x-canon-cr2 cr2 +image/x-canon-crw crw +image/x-cmu-raster ras +image/x-coreldraw cdr +image/x-coreldrawpattern pat +image/x-coreldrawtemplate cdt +image/x-corelphotopaint cpt +image/x-epson-erf erf +image/x-icon +image/x-jg art +image/x-jng jng +image/x-nikon-nef nef +image/x-olympus-orf orf +image/x-portable-anymap pnm +image/x-portable-bitmap pbm +image/x-portable-graymap pgm +image/x-portable-pixmap ppm +image/x-rgb rgb +image/x-xbitmap xbm +image/x-xpixmap xpm +image/x-xwindowdump xwd + +inode/blockdevice +inode/chardevice +inode/directory +inode/directory-locked +inode/fifo +inode/socket + +message/CPIM +message/delivery-status +message/disposition-notification +message/example +message/external-body +message/feedback-report +message/global u8msg +message/global-delivery-status u8dsn +message/global-disposition-notification u8mdn +message/global-headers u8hdr +message/http +message/imdn+xml +message/partial +message/rfc822 eml mail art +message/s-http +message/sip +message/sipfrag +message/tracking-status +message/vnd.wfa.wsc + +model/3mf +model/example +model/gltf-binary glb +model/gltf+json gltf +model/iges igs iges +model/mesh msh mesh silo +model/mtl mtl +model/obj obj +model/stl stl +model/vnd.collada+xml dae +model/vnd.dwf dwf +model/vnd.flatland.3dml +model/vnd.gdl gdl gsm win dor lmp rsm msm ism +model/vnd.gs-gdl +model/vnd.gtw gtw +model/vnd.moml+xml moml +model/vnd.mts mts +model/vnd.opengex ogex +model/vnd.parasolid.transmit.binary x_b xmt_bin +model/vnd.parasolid.transmit.text x_t xmt_txt +model/vnd.rosette.annotated-data-model +model/vnd.usdz+zip usdz +model/vnd.valve.source.compiled-map bsp +model/vnd.vtu vtu +model/vrml wrl vrml +model/x3d+fastinfoset x3db +model/x3d+vrml x3dv x3dvz +model/x3d+xml x3d + +multipart/alternative +multipart/appledouble +multipart/byteranges +multipart/digest +multipart/encrypted +multipart/form-data +multipart/header-set +multipart/mixed +multipart/multilingual +multipart/parallel +multipart/related +multipart/report +multipart/signed +multipart/vnd.bint.med-plus bmed +multipart/voice-message vpm +multipart/x-mixed-replace + +text/1d-interleaved-parityfec +text/cache-manifest appcache manifest +text/calendar ics ifb +text/css css +text/csv csv +text/csv-schema csvs +text/dns soa zone +text/encaprtp +text/english +text/enriched +text/example +text/flexfec +text/fwdred +text/grammar-ref-list +text/h323 323 +text/html html htm shtml +text/iuls uls +text/jcr-cnd cnd +text/markdown md markdown +text/mizar miz +text/n3 n3 +text/parameters +text/parityfec +text/plain txt text pot brf srt +text/provenance-notation provn +text/prs.fallenstein.rst rst +text/prs.lines.tag tag dsc +text/prs.prop.logic +text/raptorfec +text/RED +text/rfc822-headers +text/richtext rtx +text/rtf +text/rtp-enc-aescm128 +text/rtploopback +text/rtx +text/scriptlet sct +text/sgml sgml sgm +text/strings +text/t140 +text/tab-separated-values tsv +text/texmacs tm +text/troff t tr roff +text/turtle ttl +text/ulpfec +text/uri-list uris uri +text/vcard vcf vcard +text/vnd.a a +text/vnd.abc abc +text/vnd.ascii-art ascii +text/vnd.curl curl +text/vnd.debian.copyright copyright +text/vnd.DMClientScript dms +text/vnd.dvb.subtitle +text/vnd.esmertec.theme-descriptor jtd +text/vnd.ficlab.flt flt +text/vnd.flatland.3dml +text/vnd.fly fly +text/vnd.fmi.flexstor flx +text/vnd.gml +text/vnd.graphviz gv dot +text/vnd.hgl hgl +text/vnd.in3d.3dml 3dml 3dm +text/vnd.in3d.spot spot spo +text/vnd.IPTC.NewsML +text/vnd.IPTC.NITF +text/vnd.latex-z +text/vnd.motorola.reflex +text/vnd.ms-mediapackage mpf +text/vnd.net2phone.commcenter.command ccc +text/vnd.radisys.msml-basic-layout +text/vnd.senx.warpscript mc2 +text/vnd.sosi sos +text/vnd.sun.j2me.app-descriptor jad +text/vnd.trolltech.linguist ts +text/vnd.wap.si si +text/vnd.wap.sl sl +text/vnd.wap.wml wml +text/vnd.wap.wmlscript wmls +text/vtt vtt +text/x-bibtex bib +text/x-boo boo +text/x-c++hdr h++ hpp hxx hh +text/x-chdr h +text/x-component htc +text/x-crontab +text/x-csh csh +text/x-c++src c++ cpp cxx cc +text/x-csrc c +text/x-diff diff patch +text/x-dsrc d +text/x-haskell hs +text/x-java java +text/x-lilypond ly +text/x-literate-haskell lhs +text/x-makefile +text/xml +text/xml-dtd +text/xml-external-parsed-entity +text/x-moc moc +text/x-pascal p pas +text/x-pcs-gcd gcd +text/x-perl pl pm +text/x-python py +text/x-scala scala +text/x-server-parsed-html +text/x-setext etx +text/x-sfv sfv +text/x-sh sh +text/x-tcl tcl tk +text/x-tex tex ltx sty cls +text/x-vcalendar vcs + +video/1d-interleaved-parityfec +video/3gpp +video/3gpp2 +video/3gpp-tt +video/annodex axv +video/BMPEG +video/BT656 +video/CelB +video/dl dl +video/DV +video/dv dif dv +video/encaprtp +video/example +video/flexfec +video/fli fli +video/gl gl +video/H261 +video/H263 +video/H263-1998 +video/H263-2000 +video/H264 +video/H264-RCDO +video/H264-SVC +video/H265 +video/iso.segment m4s +video/JPEG +video/jpeg2000 +video/mj2 mj2 mjp2 +video/MP1S +video/MP2P +video/MP2T +video/mp4 mp4 mpg4 m4v +video/mp4v-es +video/MP4V-ES +video/mpeg mpeg mpg mpe m1v m2v +video/mpeg4-generic +video/MPV +video/nv +video/ogg ogv +video/parityfec +video/pointer +video/quicktime qt mov +video/raptorfec +video/raw +video/rtp-enc-aescm128 +video/rtploopback +video/rtx +video/smpte291 +video/SMPTE292M +video/ulpfec +video/vc1 +video/vc2 +video/vnd.CCTV +video/vnd.dece.hd uvh uvvh +video/vnd.dece.mobile uvm uvvm +video/vnd.dece.mp4 uvu uvvu +video/vnd.dece.pd uvp uvvp +video/vnd.dece.sd uvs uvvs +video/vnd.dece.video uvv uvvv +video/vnd.directv.mpeg +video/vnd.directv.mpeg-tts +video/vnd.dlna.mpeg-tts +video/vnd.dvb.file dvb +video/vnd.fvt fvt +video/vnd.hns.video +video/vnd.iptvforum.1dparityfec-1010 +video/vnd.iptvforum.1dparityfec-2005 +video/vnd.iptvforum.2dparityfec-1010 +video/vnd.iptvforum.2dparityfec-2005 +video/vnd.iptvforum.ttsavc +video/vnd.iptvforum.ttsmpeg2 +video/vnd.motorola.video +video/vnd.motorola.videop +video/vnd.mpegurl mxu m4u +video/vnd.ms-playready.media.pyv pyv +video/vnd.mts +video/vnd.nokia.interleaved-multimedia nim +video/vnd.nokia.mp4vr +video/vnd.nokia.videovoip +video/vnd.objectvideo +video/vnd.radgamettools.bink bik bk2 +video/vnd.radgamettools.smacker smk +video/vnd.sealedmedia.softseal.mov smov smo s1q +video/vnd.sealed.mpeg1 smpg s11 +video/vnd.sealed.mpeg4 s14 +video/vnd.sealed.swf sswf ssw +video/vnd.uvvu.mp4 +video/vnd.vivo viv +video/vnd.youtube.yt yt +video/VP8 +video/webm webm +video/x-flv flv +video/x-la-asf lsf lsx +video/x-matroska mpv mkv +video/x-mng mng +video/x-msvideo avi +video/x-ms-wm wm +video/x-ms-wmv wmv +video/x-ms-wmx wmx +video/x-ms-wvx wvx +video/x-sgi-movie movie + +x-conference/x-cooltalk ice +x-epoc/x-sisx-app sisx +x-world/x-vrml vrm vrml wrl \ No newline at end of file diff --git a/docker/conf/uwsgi.ini b/docker/conf/uwsgi.ini index 295e858a..d28c0972 100644 --- a/docker/conf/uwsgi.ini +++ b/docker/conf/uwsgi.ini @@ -9,14 +9,11 @@ processes=4 ;virtualenv=%(_) ;venv=%(_) ;chdir=code/ - +username = hde +gropuname = hope ;offload-threads=%k ;static-gzip-all=true -;route = /static/(.*) static:$(STATIC_ROOT)/$1 +route = /static/(.*) static:$(STATIC_ROOT)/$1 http-keepalive = 1 collect-header=Content-Type RESPONSE_CONTENT_TYPE -;response-route-if=equal:${RESPONSE_CONTENT_TYPE};application/json addheader:uWSGI-Encoding: gzip -;response-route-if=equal:${RESPONSE_CONTENT_TYPE};application/javascript addheader:uWSGI-Encoding: gzip -;response-route-if=equal:${RESPONSE_CONTENT_TYPE};text/css addheader:uWSGI-Encoding: gzip -;response-route-if=startswith:${RESPONSE_CONTENT_TYPE};text/html addheader:uWSGI-Encoding: gzip -; +mimefile=/etc/mime.types diff --git a/pdm.lock b/pdm.lock index 39f89d7f..5827246b 100644 --- a/pdm.lock +++ b/pdm.lock @@ -5,7 +5,7 @@ groups = ["default", "dev"] strategy = ["cross_platform", "inherit_metadata"] lock_version = "4.4.1" -content_hash = "sha256:0b1a8613a8ac17b48906114b5355609f28af744262b363de3524e9776ba71893" +content_hash = "sha256:7d3f2042a8da96d2ff7757f480ddc05f36918c8b03c9275b2a838fae8c0d5278" [[package]] name = "amqp" @@ -452,17 +452,6 @@ files = [ {file = "defusedxml-0.8.0rc2.tar.gz", hash = "sha256:138c7d540a78775182206c7c97fe65b246a2f40b29471e1a2f1b0da76e7a3942"}, ] -[[package]] -name = "diff-match-patch" -version = "20230430" -requires_python = ">=3.7" -summary = "Diff Match and Patch" -groups = ["default"] -files = [ - {file = "diff-match-patch-20230430.tar.gz", hash = "sha256:953019cdb9c9d2c9e47b5b12bcff3cf4746fc4598eb406076fa1fc27e6a1f15c"}, - {file = "diff_match_patch-20230430-py3-none-any.whl", hash = "sha256:dce43505fb7b1b317de7195579388df0746d90db07015ed47a85e5e44930ef93"}, -] - [[package]] name = "distlib" version = "0.3.8" @@ -498,19 +487,6 @@ files = [ {file = "django_admin_extra_buttons-1.5.8.tar.gz", hash = "sha256:48dc9d470ade3f5f29c80753af4d367c08947d02c9a5757aa7a9223eda6812c5"}, ] -[[package]] -name = "django-admin-sync" -version = "0.7.1" -summary = "" -groups = ["default"] -dependencies = [ - "django-admin-extra-buttons>=1.5.1", - "requests", -] -files = [ - {file = "django-admin-sync-0.7.1.tar.gz", hash = "sha256:70c1ff70affd05c62bbf809572ff28648e869c059294656c05364e7036cebe32"}, -] - [[package]] name = "django-adminactions" version = "2.3.0" @@ -669,22 +645,6 @@ files = [ {file = "django_flags-5.0.13-py2.py3-none-any.whl", hash = "sha256:52df74b86d93f5cb402190ad26b68a5ba0f127e9e016189f1a6f2e8ba3c06a42"}, ] -[[package]] -name = "django-import-export" -version = "4.0.3" -requires_python = ">=3.8" -summary = "Django application and library for importing and exporting data with included admin integration." -groups = ["default"] -dependencies = [ - "Django>=3.2", - "diff-match-patch", - "tablib==3.5.0", -] -files = [ - {file = "django_import_export-4.0.3-py3-none-any.whl", hash = "sha256:d55193414cb86994a2dfef47670c6887ee1ab8e5efab4ff0a7335c9cad6418c0"}, - {file = "django_import_export-4.0.3.tar.gz", hash = "sha256:9762babf66e34da194f96ada2d133585f25c065d237d749a424319a0ddef7e23"}, -] - [[package]] name = "django-picklefield" version = "3.2" @@ -708,20 +668,6 @@ files = [ {file = "django-regex-0.5.0.tar.gz", hash = "sha256:6af1add11ae5232f133a42754c9291f9113996b1294b048305d9f1a427bca27c"}, ] -[[package]] -name = "django-reversion" -version = "5.0.12" -requires_python = ">=3.7" -summary = "An extension to the Django web framework that provides version control for model instances." -groups = ["default"] -dependencies = [ - "django>=3.2", -] -files = [ - {file = "django-reversion-5.0.12.tar.gz", hash = "sha256:c047cc99a9f1ba4aae6db89c3ac243478d6de98ec8a60c7073fcc875d89c5cdb"}, - {file = "django_reversion-5.0.12-py3-none-any.whl", hash = "sha256:5884e9f77f55c341b3f0a8d3b0af000f060530653776997267c8b1e5349d8fee"}, -] - [[package]] name = "django-storages" version = "1.14.3" @@ -805,19 +751,18 @@ files = [ [[package]] name = "docker" -version = "7.0.0" +version = "7.1.0" requires_python = ">=3.8" summary = "A Python library for the Docker Engine API." groups = ["dev"] dependencies = [ - "packaging>=14.0", "pywin32>=304; sys_platform == \"win32\"", "requests>=2.26.0", "urllib3>=1.26.0", ] files = [ - {file = "docker-7.0.0-py3-none-any.whl", hash = "sha256:12ba681f2777a0ad28ffbcc846a69c31b4dfd9752b47eb425a274ee269c5e14b"}, - {file = "docker-7.0.0.tar.gz", hash = "sha256:323736fb92cd9418fc5e7133bc953e11a9da04f4483f828b527db553f1e7e5a3"}, + {file = "docker-7.1.0-py3-none-any.whl", hash = "sha256:c96b93b7f0a746f9e77d325bcfb87422a3d8bd4f03136ae8a85b37f1898d5fc0"}, + {file = "docker-7.1.0.tar.gz", hash = "sha256:ad8c70e6e3f8926cb8a92619b832b4ea5299e2831c14284663184e200546fa6c"}, ] [[package]] @@ -1920,15 +1865,14 @@ files = [ [[package]] name = "python-crontab" -version = "3.0.0" +version = "3.1.0" summary = "Python Crontab API" groups = ["default"] dependencies = [ "python-dateutil", ] files = [ - {file = "python-crontab-3.0.0.tar.gz", hash = "sha256:79fb7465039ddfd4fb93d072d6ee0d45c1ac8bf1597f0686ea14fd4361dba379"}, - {file = "python_crontab-3.0.0-py3-none-any.whl", hash = "sha256:6d5ba3c190ec76e4d252989a1644fcb233dbf53fbc8fceeb9febe1657b9fb1d4"}, + {file = "python-crontab-3.1.0.tar.gz", hash = "sha256:f4ea1605d24533b67fa7a634ef26cb59a5f2e7954f6e677d2d7a2229959a2fc8"}, ] [[package]] @@ -2025,7 +1969,7 @@ files = [ [[package]] name = "requests" -version = "2.32.1" +version = "2.32.2" requires_python = ">=3.8" summary = "Python HTTP for Humans." groups = ["default", "dev"] @@ -2036,8 +1980,8 @@ dependencies = [ "urllib3<3,>=1.21.1", ] files = [ - {file = "requests-2.32.1-py3-none-any.whl", hash = "sha256:21ac9465cdf8c1650fe1ecde8a71669a93d4e6f147550483a2967d08396a56a5"}, - {file = "requests-2.32.1.tar.gz", hash = "sha256:eb97e87e64c79e64e5b8ac75cee9dd1f97f49e289b083ee6be96268930725685"}, + {file = "requests-2.32.2-py3-none-any.whl", hash = "sha256:fc06670dd0ed212426dfeb94fc1b983d917c4f9847c863f313c9dfaaffb7c23c"}, + {file = "requests-2.32.2.tar.gz", hash = "sha256:dd951ff5ecf3e3b3aa26b40703ba77495dab41da839ae72ef3c8e5d8e2433289"}, ] [[package]] @@ -2157,7 +2101,7 @@ files = [ [[package]] name = "sentry-sdk" -version = "2.2.0" +version = "2.3.1" requires_python = ">=3.6" summary = "Python client for Sentry (https://sentry.io)" groups = ["default"] @@ -2166,19 +2110,19 @@ dependencies = [ "urllib3>=1.26.11", ] files = [ - {file = "sentry_sdk-2.2.0-py2.py3-none-any.whl", hash = "sha256:674f58da37835ea7447fe0e34c57b4a4277fad558b0a7cb4a6c83bcb263086be"}, - {file = "sentry_sdk-2.2.0.tar.gz", hash = "sha256:70eca103cf4c6302365a9d7cf522e7ed7720828910eb23d43ada8e50d1ecda9d"}, + {file = "sentry_sdk-2.3.1-py2.py3-none-any.whl", hash = "sha256:c5aeb095ba226391d337dd42a6f9470d86c9fc236ecc71cfc7cd1942b45010c6"}, + {file = "sentry_sdk-2.3.1.tar.gz", hash = "sha256:139a71a19f5e9eb5d3623942491ce03cf8ebc14ea2e39ba3e6fe79560d8a5b1f"}, ] [[package]] name = "setuptools" -version = "69.5.1" +version = "70.0.0" requires_python = ">=3.8" summary = "Easily download, build, install, upgrade, and uninstall Python packages" groups = ["dev"] files = [ - {file = "setuptools-69.5.1-py3-none-any.whl", hash = "sha256:c636ac361bc47580504644275c9ad802c50415c7522212252c033bd15f301f32"}, - {file = "setuptools-69.5.1.tar.gz", hash = "sha256:6c1fccdac05a97e598fb0ae3bbed5904ccb317337a51139dcd51453611bbb987"}, + {file = "setuptools-70.0.0-py3-none-any.whl", hash = "sha256:54faa7f2e8d2d11bcd2c07bed282eef1046b5c080d1c32add737d7b5817b1ad4"}, + {file = "setuptools-70.0.0.tar.gz", hash = "sha256:f211a66637b8fa059bb28183da127d4e86396c991a942b028c6650d4319c3fd0"}, ] [[package]] @@ -2265,17 +2209,6 @@ files = [ {file = "stack_data-0.6.3.tar.gz", hash = "sha256:836a778de4fec4dcd1dcd89ed8abff8a221f58308462e1c4aa2a3cf30148f0b9"}, ] -[[package]] -name = "tablib" -version = "3.5.0" -requires_python = ">=3.8" -summary = "Format agnostic tabular data library (XLS, JSON, YAML, CSV, etc.)" -groups = ["default"] -files = [ - {file = "tablib-3.5.0-py3-none-any.whl", hash = "sha256:9821caa9eca6062ff7299fa645e737aecff982e6b2b42046928a6413c8dabfd9"}, - {file = "tablib-3.5.0.tar.gz", hash = "sha256:f6661dfc45e1d4f51fa8a6239f9c8349380859a5bfaa73280645f046d6c96e33"}, -] - [[package]] name = "traitlets" version = "5.14.3" @@ -2366,7 +2299,7 @@ files = [ [[package]] name = "types-requests" -version = "2.32.0.20240521" +version = "2.32.0.20240523" requires_python = ">=3.8" summary = "Typing stubs for requests" groups = ["dev"] @@ -2374,30 +2307,30 @@ dependencies = [ "urllib3>=2", ] files = [ - {file = "types-requests-2.32.0.20240521.tar.gz", hash = "sha256:c5c4a0ae95aad51f1bf6dae9eed04a78f7f2575d4b171da37b622e08b93eb5d3"}, - {file = "types_requests-2.32.0.20240521-py3-none-any.whl", hash = "sha256:ab728ba43ffb073db31f21202ecb97db8753ded4a9dc49cb480d8a5350c5c421"}, + {file = "types-requests-2.32.0.20240523.tar.gz", hash = "sha256:26b8a6de32d9f561192b9942b41c0ab2d8010df5677ca8aa146289d11d505f57"}, + {file = "types_requests-2.32.0.20240523-py3-none-any.whl", hash = "sha256:f19ed0e2daa74302069bbbbf9e82902854ffa780bc790742a810a9aaa52f65ec"}, ] [[package]] name = "types-setuptools" -version = "69.5.0.20240519" +version = "70.0.0.20240524" requires_python = ">=3.8" summary = "Typing stubs for setuptools" groups = ["dev"] files = [ - {file = "types-setuptools-69.5.0.20240519.tar.gz", hash = "sha256:275fb72048b0203d3fbef268298ea78a0913cd114a74872d93f8638ccc5b7c63"}, - {file = "types_setuptools-69.5.0.20240519-py3-none-any.whl", hash = "sha256:52b264eff8913b5d85848d83bd98efea935fc6129d681d370eb957783880b720"}, + {file = "types-setuptools-70.0.0.20240524.tar.gz", hash = "sha256:e31fee7b9d15ef53980526579ac6089b3ae51a005a281acf97178e90ac71aff6"}, + {file = "types_setuptools-70.0.0.20240524-py3-none-any.whl", hash = "sha256:8f5379b9948682d72a9ab531fbe52932e84c4f38deda570255f9bae3edd766bc"}, ] [[package]] name = "typing-extensions" -version = "4.11.0" +version = "4.12.0" requires_python = ">=3.8" summary = "Backported and Experimental Type Hints for Python 3.8+" groups = ["default", "dev"] files = [ - {file = "typing_extensions-4.11.0-py3-none-any.whl", hash = "sha256:c1f94d72897edaf4ce775bb7558d5b79d8126906a14ea5ed1635921406c0387a"}, - {file = "typing_extensions-4.11.0.tar.gz", hash = "sha256:83f085bd5ca59c80295fc2a82ab5dac679cbe02b9f33f7d83af68e241bea51b0"}, + {file = "typing_extensions-4.12.0-py3-none-any.whl", hash = "sha256:b349c66bea9016ac22978d800cfff206d5f9816951f12a7d0ec5578b0a819594"}, + {file = "typing_extensions-4.12.0.tar.gz", hash = "sha256:8cbcdc8606ebcb0d95453ad7dc5065e6237b6aa230a31e81d0f440c30fed5fd8"}, ] [[package]] @@ -2518,28 +2451,31 @@ files = [ [[package]] name = "watchdog" -version = "4.0.0" +version = "4.0.1" requires_python = ">=3.8" summary = "Filesystem events monitoring" groups = ["dev"] files = [ - {file = "watchdog-4.0.0-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:11e12fafb13372e18ca1bbf12d50f593e7280646687463dd47730fd4f4d5d257"}, - {file = "watchdog-4.0.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:5369136a6474678e02426bd984466343924d1df8e2fd94a9b443cb7e3aa20d19"}, - {file = "watchdog-4.0.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:76ad8484379695f3fe46228962017a7e1337e9acadafed67eb20aabb175df98b"}, - {file = "watchdog-4.0.0-pp310-pypy310_pp73-macosx_10_9_x86_64.whl", hash = "sha256:6e949a8a94186bced05b6508faa61b7adacc911115664ccb1923b9ad1f1ccf7b"}, - {file = "watchdog-4.0.0-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:6a4db54edea37d1058b08947c789a2354ee02972ed5d1e0dca9b0b820f4c7f92"}, - {file = "watchdog-4.0.0-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:d31481ccf4694a8416b681544c23bd271f5a123162ab603c7d7d2dd7dd901a07"}, - {file = "watchdog-4.0.0-py3-none-manylinux2014_aarch64.whl", hash = "sha256:8fec441f5adcf81dd240a5fe78e3d83767999771630b5ddfc5867827a34fa3d3"}, - {file = "watchdog-4.0.0-py3-none-manylinux2014_armv7l.whl", hash = "sha256:6a9c71a0b02985b4b0b6d14b875a6c86ddea2fdbebd0c9a720a806a8bbffc69f"}, - {file = "watchdog-4.0.0-py3-none-manylinux2014_i686.whl", hash = "sha256:557ba04c816d23ce98a06e70af6abaa0485f6d94994ec78a42b05d1c03dcbd50"}, - {file = "watchdog-4.0.0-py3-none-manylinux2014_ppc64.whl", hash = "sha256:d0f9bd1fd919134d459d8abf954f63886745f4660ef66480b9d753a7c9d40927"}, - {file = "watchdog-4.0.0-py3-none-manylinux2014_ppc64le.whl", hash = "sha256:f9b2fdca47dc855516b2d66eef3c39f2672cbf7e7a42e7e67ad2cbfcd6ba107d"}, - {file = "watchdog-4.0.0-py3-none-manylinux2014_s390x.whl", hash = "sha256:73c7a935e62033bd5e8f0da33a4dcb763da2361921a69a5a95aaf6c93aa03a87"}, - {file = "watchdog-4.0.0-py3-none-manylinux2014_x86_64.whl", hash = "sha256:6a80d5cae8c265842c7419c560b9961561556c4361b297b4c431903f8c33b269"}, - {file = "watchdog-4.0.0-py3-none-win32.whl", hash = "sha256:8f9a542c979df62098ae9c58b19e03ad3df1c9d8c6895d96c0d51da17b243b1c"}, - {file = "watchdog-4.0.0-py3-none-win_amd64.whl", hash = "sha256:f970663fa4f7e80401a7b0cbeec00fa801bf0287d93d48368fc3e6fa32716245"}, - {file = "watchdog-4.0.0-py3-none-win_ia64.whl", hash = "sha256:9a03e16e55465177d416699331b0f3564138f1807ecc5f2de9d55d8f188d08c7"}, - {file = "watchdog-4.0.0.tar.gz", hash = "sha256:e3e7065cbdabe6183ab82199d7a4f6b3ba0a438c5a512a68559846ccb76a78ec"}, + {file = "watchdog-4.0.1-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:093b23e6906a8b97051191a4a0c73a77ecc958121d42346274c6af6520dec175"}, + {file = "watchdog-4.0.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:611be3904f9843f0529c35a3ff3fd617449463cb4b73b1633950b3d97fa4bfb7"}, + {file = "watchdog-4.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:62c613ad689ddcb11707f030e722fa929f322ef7e4f18f5335d2b73c61a85c28"}, + {file = "watchdog-4.0.1-pp310-pypy310_pp73-macosx_10_9_x86_64.whl", hash = "sha256:0144c0ea9997b92615af1d94afc0c217e07ce2c14912c7b1a5731776329fcfc7"}, + {file = "watchdog-4.0.1-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:998d2be6976a0ee3a81fb8e2777900c28641fb5bfbd0c84717d89bca0addcdc5"}, + {file = "watchdog-4.0.1-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:e7921319fe4430b11278d924ef66d4daa469fafb1da679a2e48c935fa27af193"}, + {file = "watchdog-4.0.1-pp38-pypy38_pp73-macosx_11_0_arm64.whl", hash = "sha256:f0de0f284248ab40188f23380b03b59126d1479cd59940f2a34f8852db710625"}, + {file = "watchdog-4.0.1-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:bca36be5707e81b9e6ce3208d92d95540d4ca244c006b61511753583c81c70dd"}, + {file = "watchdog-4.0.1-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:ab998f567ebdf6b1da7dc1e5accfaa7c6992244629c0fdaef062f43249bd8dee"}, + {file = "watchdog-4.0.1-py3-none-manylinux2014_aarch64.whl", hash = "sha256:dddba7ca1c807045323b6af4ff80f5ddc4d654c8bce8317dde1bd96b128ed253"}, + {file = "watchdog-4.0.1-py3-none-manylinux2014_armv7l.whl", hash = "sha256:4513ec234c68b14d4161440e07f995f231be21a09329051e67a2118a7a612d2d"}, + {file = "watchdog-4.0.1-py3-none-manylinux2014_i686.whl", hash = "sha256:4107ac5ab936a63952dea2a46a734a23230aa2f6f9db1291bf171dac3ebd53c6"}, + {file = "watchdog-4.0.1-py3-none-manylinux2014_ppc64.whl", hash = "sha256:6e8c70d2cd745daec2a08734d9f63092b793ad97612470a0ee4cbb8f5f705c57"}, + {file = "watchdog-4.0.1-py3-none-manylinux2014_ppc64le.whl", hash = "sha256:f27279d060e2ab24c0aa98363ff906d2386aa6c4dc2f1a374655d4e02a6c5e5e"}, + {file = "watchdog-4.0.1-py3-none-manylinux2014_s390x.whl", hash = "sha256:f8affdf3c0f0466e69f5b3917cdd042f89c8c63aebdb9f7c078996f607cdb0f5"}, + {file = "watchdog-4.0.1-py3-none-manylinux2014_x86_64.whl", hash = "sha256:ac7041b385f04c047fcc2951dc001671dee1b7e0615cde772e84b01fbf68ee84"}, + {file = "watchdog-4.0.1-py3-none-win32.whl", hash = "sha256:206afc3d964f9a233e6ad34618ec60b9837d0582b500b63687e34011e15bb429"}, + {file = "watchdog-4.0.1-py3-none-win_amd64.whl", hash = "sha256:7577b3c43e5909623149f76b099ac49a1a01ca4e167d1785c76eb52fa585745a"}, + {file = "watchdog-4.0.1-py3-none-win_ia64.whl", hash = "sha256:d7b9f5f3299e8dd230880b6c55504a1f69cf1e4316275d1b215ebdd8187ec88d"}, + {file = "watchdog-4.0.1.tar.gz", hash = "sha256:eebaacf674fa25511e8867028d281e602ee6500045b57f43b08778082f7f8b44"}, ] [[package]] diff --git a/pdm.toml b/pdm.toml index dfe8d052..0e5b99fa 100644 --- a/pdm.toml +++ b/pdm.toml @@ -1,5 +1,5 @@ [python] -use_venv = false +use_venv = true [venv] in_project = true diff --git a/pyproject.toml b/pyproject.toml index 8d0955b6..f30e2ff8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,7 +12,6 @@ dependencies = [ "Django", "celery[redis]", "django-admin-extra-buttons", - "django-admin-sync", "django-adminactions", "django-adminfilters", "django-celery-beat", @@ -23,23 +22,20 @@ dependencies = [ "django-environ>=0.11.2", "django-extensions", "django-filter", - "django-import-export", + "django-flags>=5.0.13", "django-regex>=0.5.0", "django-storages[azure]", "djangorestframework", + "drf-nested-routers>=0.94.1", "drf-spectacular[sidecar]", - "gunicorn", + "face-recognition>=1.3.0", + "opencv-python>=4.9.0.80", "psycopg2-binary>=2.9.9", "sentry-sdk", "social-auth-app-django", "social-auth-core", "unicef-security", - "django-flags>=5.0.13", - "django-reversion>=5.0.12", "uwsgi>=2.0.25.1", - "drf-nested-routers>=0.94.1", - "face-recognition>=1.3.0", - "opencv-python>=4.9.0.80", ] [tool.pdm.build] @@ -63,9 +59,12 @@ dev = [ "openpyxl-stubs", "pre-commit", "pytest", + "pytest-celery>=1.0.0", "pytest-cov", "pytest-django", "pytest-echo", + "pytest-factoryboy>=2.7.0", + "pytest-mock>=3.14.0", "pytest-xdist", "requests-mock", "responses>=0.25.0", @@ -76,9 +75,6 @@ dev = [ "types-requests", "unittest-xml-reporting", "watchdog", - "pytest-factoryboy>=2.7.0", - "pytest-mock>=3.14.0", - "pytest-celery>=1.0.0", ] [tool.black] line-length = 120 @@ -111,4 +107,13 @@ skip = ["migrations", "snapshots", ".venv"] django_settings_module = "hope_dedup_engine.config.settings" [tool.pdm.scripts] -coverage = "pytest tests/ --cov -n auto --create-db -c pytest.ini" \ No newline at end of file +coverage = "pytest tests/ --cov -n auto --create-db -c pytest.ini" +act = "act" + +[tool.towncrier] +directory = "changes" +package = "hope_dedup_engine" +filename = "CHANGELOG.md" +title_format = "v.{version} {project_date}" +issue_format = "`#{issue} `_" +wrap = true diff --git a/pytest.ini b/pytest.ini index 8a4dac89..d0f60bde 100644 --- a/pytest.ini +++ b/pytest.ini @@ -23,6 +23,7 @@ addopts = --capture=sys --cov-config=tests/.coveragerc --cov-report html + --cov-report xml --cov-append diff --git a/src/hope_dedup_engine/__init__.py b/src/hope_dedup_engine/__init__.py index 1cf6267a..428345e8 100644 --- a/src/hope_dedup_engine/__init__.py +++ b/src/hope_dedup_engine/__init__.py @@ -1 +1 @@ -VERSION = "0.1.0" +VERSION = __version__ = "0.1.0" diff --git a/src/hope_dedup_engine/apps/core/management/commands/upgrade.py b/src/hope_dedup_engine/apps/core/management/commands/upgrade.py index 00187e4f..a6e09ff0 100644 --- a/src/hope_dedup_engine/apps/core/management/commands/upgrade.py +++ b/src/hope_dedup_engine/apps/core/management/commands/upgrade.py @@ -133,10 +133,6 @@ def handle(self, *args: Any, **options: Any) -> None: # noqa: C901 call_command("migrate", **extra) call_command("create_extra_permissions") - echo("Init reversion") - call_command("createinitialrevisions") - call_command("deleterevisions", days=180, keep=3) - echo("Remove stale contenttypes") call_command("remove_stale_contenttypes", **extra) from hope_dedup_engine.apps.security.models import User @@ -164,7 +160,6 @@ def handle(self, *args: Any, **options: Any) -> None: # noqa: C901 admin = User.objects.get(email=self.admin_email) else: admin = User.objects.filter(is_superuser=True).first() - if not admin: raise CommandError("Create an admin user") diff --git a/src/hope_dedup_engine/config/settings.py b/src/hope_dedup_engine/config/settings.py index 145069e8..9c115e80 100644 --- a/src/hope_dedup_engine/config/settings.py +++ b/src/hope_dedup_engine/config/settings.py @@ -31,8 +31,6 @@ "django.contrib.postgres", "django.contrib.admin", "flags", - "reversion", - # "django_filters", "social_django", "admin_extra_buttons", "adminactions", diff --git a/tests/conftest.py b/tests/conftest.py index 52d10e04..6823372f 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -27,6 +27,9 @@ def pytest_configure(config): os.environ["FILE_STORAGE_MEDIA"] = "django.core.files.storage.FileSystemStorage?location=/tmp/hde/storage/" os.environ["FILE_STORAGE_HOPE"] = "django.core.files.storage.FileSystemStorage?location=/tmp/hde/hope/" os.environ["SOCIAL_AUTH_REDIRECT_IS_HTTPS"] = "0" + os.environ["CELERY_TASK_ALWAYS_EAGER"] = "0" + os.environ["SECURE_HSTS_PRELOAD"] = "0" + os.environ["SECRET_KEY"] = "kugiugiuygiuygiuygiuhgiuhgiuhgiugiu" os.environ["GMAIL_USER"] = "11" os.environ["GMAIL_PASSWORD"] = "11" diff --git a/tests/test_commands.py b/tests/test_commands.py index 25d879fe..488e3fc5 100644 --- a/tests/test_commands.py +++ b/tests/test_commands.py @@ -13,6 +13,7 @@ @pytest.fixture() def environment(): return { + "ADMIN_EMAIL": "", "CACHE_URL": "test", "CELERY_BROKER_URL": "", "DATABASE_URL": "", @@ -63,7 +64,7 @@ def test_upgrade_check(mocked_responses, admin_user, environment): call_command("upgrade", stdout=out, check=True) -def test_upgrade_noadmin(transactional_db, mocked_responses, environment): +def test_upgrade_noadmin(db, mocked_responses, environment): out = StringIO() with mock.patch.dict(os.environ, environment, clear=True): with pytest.raises(SystemExit): @@ -71,7 +72,7 @@ def test_upgrade_noadmin(transactional_db, mocked_responses, environment): @pytest.mark.parametrize("admin", [True, False], ids=["existing_admin", "new_admin"]) -def test_upgrade_admin(transactional_db, mocked_responses, environment, admin): +def test_upgrade_admin(db, mocked_responses, environment, admin): if admin: email = SuperUserFactory().email else: