Skip to content

Commit

Permalink
Improvements (#65)
Browse files Browse the repository at this point in the history
* update changelog

* delete circle ci file

* add specific docker ini file

* fix production ini file

* Update dockerfile to ubuntu noble

* add pip to dependabot checks
  • Loading branch information
submarcos authored Nov 19, 2024
1 parent ea1efc4 commit 2d1712d
Show file tree
Hide file tree
Showing 6 changed files with 79 additions and 118 deletions.
113 changes: 0 additions & 113 deletions .circleci/config.yml

This file was deleted.

4 changes: 4 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,8 @@ updates:
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
- package-ecosystem: "pip"
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
open-pull-requests-limit: 20
3 changes: 2 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ CHANGELOG
2.2.6.dev0
------------------

- Add Ubuntu 24.04 official support with debian package
- Add Ubuntu 22.04 official support with debian package
- Update Docker image to ubuntu 22.04 base
- Update Docker image to ubuntu 24.04 base
- Use directly libreoffice instead of deprecated unoconv
- Move CI to github-action
- Fix typo in attachment response Content-Disposition (#38)
Expand Down
5 changes: 2 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
ARG DISTRO=jammy
ARG DISTRO=noble

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

COPY .docker/run.sh /usr/local/bin/run
Expand Down Expand Up @@ -37,6 +36,6 @@ 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
COPY docker.ini /opt/apps/convertit/production.ini
VOLUME /var/cache/convertit/downloads
VOLUME /var/cache/convertit/converted
70 changes: 70 additions & 0 deletions docker.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
[app:main]
use = egg:convertit

pyramid.reload_templates = false
pyramid.debug_authorization = false
pyramid.debug_notfound = false
pyramid.debug_routematch = false
pyramid.default_locale_name = en

convertit.downloads_path = /var/cache/convertit/downloads
convertit.downloads_max_age = 60
convertit.converted_path = /var/cache/convertit/converted
convertit.converted_max_age = 60
# The retrieve url of converted files
# It can be a full url like http://static.domain.tld/full/path/
convertit.converted_url = converted
# Available options:
# url_hostname: the url hostname
# url_port: the url port
# url_dirname: the url path's dirname with '/' replaced by '_'
# url_filename: filename part of the url path's basename
# url_extension: extension part of the url path's basename
# extension: the converted extension
# Exemple: url=http://exemple.com:8080/path/to/foo.bar&to=application/pdf
# url_hostname: exemple.com
# url_port: 8080
# url_dirname: path_to
# url_filename: foo
# url_extension: .bar
# extension: .pdf
convertit.converted_name = {url_hostname}_{url_port}_{url_dirname}_{url_filename}{extension}
convertit.converters =
convertit.converters.unoconv
convertit.converters.inkscape

[server:main]
use = egg:gunicorn#main
host = 0.0.0.0
port = 6543

# Begin logging configuration

[loggers]
keys = root, convertit

[handlers]
keys = console

[formatters]
keys = generic

[logger_root]
level = WARN
handlers = console

[logger_convertit]
level = WARN
handlers =
qualname = convertit

[handler_console]
class = StreamHandler
args = (sys.stderr,)
level = NOTSET
formatter = generic

[formatter_generic]
format = %(asctime)s %(levelname)-5.5s [%(name)s][%(threadName)s] %(message)s

# End logging configuration
2 changes: 1 addition & 1 deletion production.ini
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ convertit.converters =

[server:main]
use = egg:gunicorn#main
host = 0.0.0.0
host = localhost
port = 6543

# Begin logging configuration
Expand Down

0 comments on commit 2d1712d

Please sign in to comment.