-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
define and use pinned requirements (#60)
* define and use pinned requirements * Works with python 3.12 * Build jammy and noble debian packages
- Loading branch information
Showing
16 changed files
with
200 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for all configuration options: | ||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" # Location of package manifests | ||
schedule: | ||
interval: "weekly" | ||
open-pull-requests-limit: 20 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,42 @@ | ||
ARG DISTRO=jammy | ||
|
||
FROM ubuntu:${DISTRO} as base | ||
MAINTAINER Makina Corpus "[email protected]" | ||
FROM ubuntu:${DISTRO} AS base | ||
LABEL org.opencontainers.image.authors="Makina Corpus <[email protected]>" | ||
|
||
RUN apt-get update && apt-get install -y -qq python3 libreoffice default-jre libreoffice-java-common inkscape python3-magic && \ | ||
apt-get autoclean && apt-get clean all && rm -rf /var/apt/lists/* | ||
|
||
|
||
WORKDIR /opt/apps/convertit | ||
|
||
ADD .docker/run.sh /usr/local/bin/run | ||
COPY .docker/run.sh /usr/local/bin/run | ||
|
||
EXPOSE 6543 | ||
CMD ["/bin/sh", "-e", "/usr/local/bin/run"] | ||
|
||
FROM base as build | ||
FROM base AS build | ||
RUN apt-get update && apt-get install -y -qq build-essential python3-venv python3-dev && \ | ||
apt-get autoclean && apt-get clean all && rm -rf /var/apt/lists/* | ||
|
||
ADD . /opt/apps/convertit | ||
COPY requirements.txt /requirements.txt | ||
|
||
RUN python3 -m venv . && ./bin/pip install --no-cache-dir pip setuptools wheel -U | ||
RUN ./bin/python setup.py install | ||
RUN python3 -m venv /opt/venv && /opt/venv/bin/pip install --no-cache-dir pip setuptools wheel -U && /opt/venv/bin/pip install --no-cache-dir -U -r /requirements.txt | ||
|
||
FROM base as prod | ||
|
||
FROM build AS dev | ||
|
||
COPY dev-requirements.txt /dev-requirements.txt | ||
|
||
RUN /opt/venv/bin/pip install --no-cache-dir -U -r /dev-requirements.txt | ||
|
||
FROM base AS prod | ||
|
||
COPY --from=build /opt/apps/convertit /opt/apps/convertit | ||
ADD .docker/run.sh /usr/local/bin/run | ||
COPY --from=build /opt/venv /opt/venv | ||
COPY convertit /opt/apps/convertit/convertit | ||
COPY setup.py /opt/apps/convertit/setup.py | ||
COPY README.rst /opt/apps/convertit/README.rst | ||
RUN /opt/venv/bin/pip install . | ||
COPY production.ini /opt/apps/convertit/production.ini | ||
VOLUME /var/cache/convertit/downloads | ||
VOLUME /var/cache/convertit/converted |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
-c requirements.txt | ||
|
||
webtest | ||
mock | ||
coverage | ||
freezegun | ||
flake8 | ||
isort | ||
pip-tools |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# | ||
# This file is autogenerated by pip-compile with Python 3.12 | ||
# by the following command: | ||
# | ||
# pip-compile dev-requirements.in | ||
# | ||
beautifulsoup4==4.12.2 | ||
# via webtest | ||
build==1.0.3 | ||
# via pip-tools | ||
click==8.1.7 | ||
# via pip-tools | ||
coverage==7.3.2 | ||
# via -r dev-requirements.in | ||
flake8==6.1.0 | ||
# via -r dev-requirements.in | ||
freezegun==1.3.1 | ||
# via -r dev-requirements.in | ||
isort==5.12.0 | ||
# via -r dev-requirements.in | ||
mccabe==0.7.0 | ||
# via flake8 | ||
mock==5.1.0 | ||
# via -r dev-requirements.in | ||
packaging==23.2 | ||
# via | ||
# -c requirements.txt | ||
# build | ||
pip-tools==7.3.0 | ||
# via -r dev-requirements.in | ||
pycodestyle==2.11.1 | ||
# via flake8 | ||
pyflakes==3.1.0 | ||
# via flake8 | ||
pyproject-hooks==1.0.0 | ||
# via build | ||
python-dateutil==2.8.2 | ||
# via freezegun | ||
six==1.16.0 | ||
# via python-dateutil | ||
soupsieve==2.5 | ||
# via beautifulsoup4 | ||
waitress==2.1.2 | ||
# via webtest | ||
webob==1.8.7 | ||
# via | ||
# -c requirements.txt | ||
# webtest | ||
webtest==3.0.0 | ||
# via -r dev-requirements.in | ||
wheel==0.42.0 | ||
# via pip-tools | ||
|
||
# The following packages are considered to be unsafe in a requirements file: | ||
# pip | ||
# setuptools |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
version: "3.8" | ||
services: | ||
web: | ||
build: | ||
target: dev | ||
volumes: | ||
- .:/opt/apps/convertit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
pyramid | ||
python-magic | ||
Pillow | ||
gunicorn |
Oops, something went wrong.