diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4c992500..0276b70b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -19,7 +19,7 @@ jobs: runs-on: ubuntu-latest services: postgres: - image: postgres:11 + image: postgres:15 env: POSTGRES_USER: exodus POSTGRES_PASSWORD: exodus @@ -34,8 +34,8 @@ jobs: strategy: matrix: python-version: - - "3.9" - "3.10" + - "3.11" steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} diff --git a/Pipfile b/Pipfile index 5b209665..d9ddd18d 100644 --- a/Pipfile +++ b/Pipfile @@ -17,7 +17,7 @@ exodus-core = "==1.3.10" google-play-scraper = "~=1.2.2" gunicorn = "~=20.1" mistune = "~=0.8" -psycopg2 = "~=2.8.6" +psycopg2 = "~=2.9.9" requests = "~=2.27" protobuf = "~=3.20.1" whitenoise = "~=6.2.0" diff --git a/Pipfile.lock b/Pipfile.lock index 6663994d..75620a37 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1019,25 +1019,23 @@ }, "psycopg2": { "hashes": [ - "sha256:00195b5f6832dbf2876b8bf77f12bdce648224c89c880719c745b90515233301", - "sha256:068115e13c70dc5982dfc00c5d70437fe37c014c808acce119b5448361c03725", - "sha256:26e7fd115a6db75267b325de0fba089b911a4a12ebd3d0b5e7acb7028bc46821", - "sha256:2c93d4d16933fea5bbacbe1aaf8fa8c1348740b2e50b3735d1b0bf8154cbf0f3", - "sha256:56007a226b8e95aa980ada7abdea6b40b75ce62a433bd27cec7a8178d57f4051", - "sha256:56fee7f818d032f802b8eed81ef0c1232b8b42390df189cab9cfa87573fe52c5", - "sha256:6a3d9efb6f36f1fe6aa8dbb5af55e067db802502c55a9defa47c5a1dad41df84", - "sha256:a49833abfdede8985ba3f3ec641f771cca215479f41523e99dace96d5b8cce2a", - "sha256:ad2fe8a37be669082e61fb001c185ffb58867fdbb3e7a6b0b0d2ffe232353a3e", - "sha256:b8cae8b2f022efa1f011cc753adb9cbadfa5a184431d09b273fb49b4167561ad", - "sha256:d160744652e81c80627a909a0e808f3c6653a40af435744de037e3172cf277f5", - "sha256:d5062ae50b222da28253059880a871dc87e099c25cb68acf613d9d227413d6f7", - "sha256:f22ea9b67aea4f4a1718300908a2fb62b3e4276cf00bd829a97ab5894af42ea3", - "sha256:f974c96fca34ae9e4f49839ba6b78addf0346777b46c4da27a7bf54f48d3057d", - "sha256:fb23f6c71107c37fd667cb4ea363ddeb936b348bbd6449278eb92c189699f543" + "sha256:121081ea2e76729acfb0673ff33755e8703d45e926e416cb59bae3a86c6a4981", + "sha256:38a8dcc6856f569068b47de286b472b7c473ac7977243593a288ebce0dc89516", + "sha256:426f9f29bde126913a20a96ff8ce7d73fd8a216cfb323b1f04da402d452853c3", + "sha256:5e0d98cade4f0e0304d7d6f25bbfbc5bd186e07b38eac65379309c4ca3193efa", + "sha256:7e2dacf8b009a1c1e843b5213a87f7c544b2b042476ed7755be813eaf4e8347a", + "sha256:a7653d00b732afb6fc597e29c50ad28087dcb4fbfb28e86092277a559ae4e693", + "sha256:ade01303ccf7ae12c356a5e10911c9e1c51136003a9a1d92f7aa9d010fb98372", + "sha256:bac58c024c9922c23550af2a581998624d6e02350f4ae9c5f0bc642c633a2d5e", + "sha256:c92811b2d4c9b6ea0285942b2e7cac98a59e166d59c588fe5cfe1eda58e72d59", + "sha256:d1454bde93fb1e224166811694d600e746430c006fbb031ea06ecc2ea41bf156", + "sha256:d735786acc7dd25815e89cc4ad529a43af779db2e25aa7c626de864127e5a024", + "sha256:de80739447af31525feddeb8effd640782cf5998e1a4e9192ebdf829717e3913", + "sha256:ff432630e510709564c01dafdbe996cb552e0b9f3f065eb89bdce5bd31fabf4c" ], "index": "pypi", - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", - "version": "==2.8.6" + "markers": "python_version >= '3.7'", + "version": "==2.9.9" }, "ptyprocess": { "hashes": [ diff --git a/docker-compose.yml b/docker-compose.yml index 684f3086..46e5612c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,7 +2,7 @@ version: "3" services: amqp: - image: rabbitmq:3.8.9-alpine + image: rabbitmq:3.10.8-alpine networks: backend: aliases: @@ -16,7 +16,7 @@ services: POSTGRES_PASSWORD: exodus POSTGRES_DB: exodus PGDATA: /var/lib/postgresql/data/pgdata - image: postgres:11 + image: postgres:15 restart: always networks: backend: @@ -70,7 +70,7 @@ services: environment: MINIO_ROOT_USER: exodusexodus MINIO_ROOT_PASSWORD: exodusexodus - image: minio/minio:RELEASE.2022-03-14T18-25-24Z + image: minio/minio:RELEASE.2024-01-05T22-17-24Z networks: backend: aliases: diff --git a/docker/Dockerfile b/docker/Dockerfile index 00d2be7e..a1e63883 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,26 +1,58 @@ -FROM alpine:3.18 AS apkeep-download +FROM rust:1.75.0-slim-bookworm AS apkeep-build ENV APKEEP_VERSION=0.15.0 +ENV OPENSSL_VERSION=1.1.1w -RUN wget https://github.com/EFForg/apkeep/releases/download/${APKEEP_VERSION}/apkeep-x86_64-unknown-linux-gnu -q -O /tmp/apkeep \ - && chmod +x /tmp/apkeep +# Workaround to build Apkeep (see https://github.com/Exodus-Privacy/exodus/issues/598) -FROM python:3.9-slim-bullseye +RUN apt-get update && apt-get install --no-install-recommends -y \ + build-essential=12.* \ + ca-certificates=202* \ + curl=7.* \ + pkg-config=1.* \ + wget=1.* \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* + +## Build OpenSSL + +RUN wget https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz -q -O /tmp/openssl-${OPENSSL_VERSION}.tar.gz \ + && tar xfvz /tmp/openssl-${OPENSSL_VERSION}.tar.gz --directory /tmp/ +WORKDIR /tmp/openssl-${OPENSSL_VERSION}/ +RUN ./config --prefix=/opt/openssl --openssldir=/opt/openssl \ + && make \ + && make test \ + && make install_sw + +## Build Apkeep + +RUN wget https://github.com/EFForg/apkeep/archive/refs/tags/${APKEEP_VERSION}.tar.gz -q -O /tmp/apkeep-${APKEEP_VERSION}.tar.gz \ + && tar -xzf /tmp/apkeep-${APKEEP_VERSION}.tar.gz -C /tmp/ \ + && rm /tmp/apkeep-${APKEEP_VERSION}.tar.gz +WORKDIR /tmp/apkeep-${APKEEP_VERSION} +RUN PATH=/opt/openssl/bin:$PATH LD_LIBRARY_PATH=/opt/openssl/lib OPENSSL_STATIC=1 OPENSSL_INCLUDE_DIR=/opt/openssl/include/ OPENSSL_LIB_DIR=/opt/openssl/lib/ OPENSSL_DIR=/opt/openssl/ cargo build --release \ + && chmod +x target/release/apkeep \ + && mv target/release/apkeep /opt/apkeep + +FROM python:3.11-slim-bookworm LABEL maintainer="Codimp" RUN apt-get update && apt-get install --no-install-recommends -y \ - dexdump=10.0.0* \ - postgresql-client-13=13* \ - libpq-dev=13.* \ - gcc=4:10.2.* \ + dexdump=11.0.0* \ + postgresql-client-15=15* \ + libpq-dev=15.* \ + gcc=4:12.2.* \ musl-dev=1.2.* \ libc6-dev=2.* \ gettext=0.* \ - pipenv=11.* \ + pipenv=2022.12.* \ + libssl3=3.* \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* -COPY --from=apkeep-download /tmp/apkeep /usr/local/bin/apkeep +COPY --from=apkeep-build /opt/openssl /opt/openssl +COPY --from=apkeep-build /opt/apkeep /usr/local/bin/apkeep +RUN ln -s /usr/lib/ssl/certs /opt/openssl/certs WORKDIR /opt