Giter VIP home page Giter VIP logo

docker-compose's People

Contributors

antonanders avatar blacksails avatar botanegg avatar brakhane avatar cedk avatar danmark avatar dependabot-preview[bot] avatar dependabot[bot] avatar glensc avatar josh-english-2k18 avatar joubu avatar kwadronaut avatar lackaff avatar mcfedr avatar moylop260 avatar mydnicq avatar nijel avatar pc-jedi avatar pre-commit-ci[bot] avatar ptman avatar renovate[bot] avatar smotaal avatar stefk avatar stephtr avatar wichert avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-compose's Issues

Both containers is always restarting

Describe the issue

root@ip-172-26-6-209:/opt/weblate# vi docker-compose.override.yml
root@ip-172-26-6-209:/opt/weblate# docker-compose up -d
[+] Running 9/9
 ⠿ database Pulled                                                14.8s
   ⠿ 59bf1c3509f3 Already exists                                   0.0s
   ⠿ c50e01d57241 Already exists                                   0.0s
   ⠿ a0646b0f1ead Already exists                                   0.0s
   ⠿ 13e1654659bd Pull complete                                    9.7s
   ⠿ e3b9a3f3f99a Pull complete                                    9.8s
   ⠿ 4fedc9442766 Pull complete                                    9.9s
   ⠿ bebd9fd7df3c Pull complete                                   10.0s
   ⠿ 57e39b7da4a2 Pull complete                                   10.0s
[+] Running 3/3
 ⠿ Container weblate-database-1  Started                           1.7s
 ⠿ Container weblate-cache-1     Ru...                             0.0s
 ⠿ Container weblate-weblate-1   Started                           1.5s
root@ip-172-26-6-209:/opt/weblate# docker ps
CONTAINER ID   IMAGE                  COMMAND                  CREATED         STATUS                          PORTS                  
0a9c86b247d1   weblate/weblate        "/app/bin/start runs…"   3 minutes ago   Restarting (1) 17 seconds ago                          
0512851d6565   postgres:14-alpine     "docker-entrypoint.s…"   3 minutes ago   Restarting (1) 18 seconds ago 

I already tried

  • I've read and searched the documentation.
  • I've searched for similar issues in this repository.

Steps to reproduce the behavior

No response

Expected behavior

No response

Screenshots

No response

Exception traceback

No response

Additional context

No response

Installation failed

Hello, i tried to install weblate with docker and followed the documentation closely. The startup of the database container fails.

Error message.

database_1  | 2020-10-02 10:08:19.878 UTC [1] FATAL:  database files are incompatible with server
database_1  | 2020-10-02 10:08:19.878 UTC [1] DETAIL:  The data directory was initialized by PostgreSQL version 11, which is not compatible with this version 12.4.

I tried to downgrade it to PostgreSQL 11, but the installation still fails with

weblate_1   | django.db.migrations.exceptions.NodeNotFoundError: Migration weblate_auth.0008_auto_20200611_1232 depends on nonexistent node ('weblate_auth', '0007_group_components'). Django tried to replace migration weblate_auth.0007_group_components with any of [weblate_auth.0002_auto_20180507_1540_squashed_0011_auto_20180509_0739_squashed_0007_group_components] but wasn't able to because some of the replaced migrations are already applied.
weblate_1   |
weblate_1   | Migration from this version is not supported!
weblate_1   | Please upgrade to 4.1.1-3 first.

How to expose a local borg backup?

I installed weblate via docker-compose and it is saying I have no local backup ... ok, so I tried to add a new volume to the compose override file and tried mapping it into /weblate-local-backup ... result "Permission error".

So I read the Dockerfile and so came to the idea to do it inside the /home/weblate because here the owner is changed on docker start ... but also here I get a permission error.

So: What is the prefered way to setup a local borg backup and expose this as a volume?

Thank you

PostgreSQL update causing issues

Describe the issue

Docker install of Weblate.

After a git pull of this repo on the machine my instance is hosted it pukked in this update (0041e3a), which updates PostgreSQL from version 15 to 16.

Now after restarting docker, I'm facing this error:

database_1  | 2023-10-21 09:07:54.924 UTC [1] DETAIL:  The data directory was initialized by PostgreSQL version 15, which is not compatible with this version 16.0.

I already tried

  • I've read and searched the documentation.
  • I've searched for similar issues in this repository.

Steps to reproduce the behavior

  • Update the local clone of this repo via git pull which pulls in 0041e3a
  • Restart docker

Expected behavior

Weblate is to be starting and PostgreSQL is being migrated to the new version without throwing a tantrum.

Screenshots

No response

Exception traceback

» docker-compose logs -f
Attaching to weblate, weblate_database, weblate_cache
weblate     | Starting...
cache_1     | 1:C 21 Oct 2023 09:58:42.793 # WARNING Memory overcommit must be enabled! Without it, a background save or replication may fail under low memory condition. Being disabled, it can also cause failures without low memory condition, see https://github.com/jemalloc/jemalloc/issues/1328. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
cache_1     | 1:C 21 Oct 2023 09:58:42.798 * oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
cache_1     | 1:C 21 Oct 2023 09:58:42.798 * Redis version=7.2.2, bits=64, commit=00000000, modified=0, pid=1, just started
cache_1     | 1:C 21 Oct 2023 09:58:42.798 * Configuration loaded
cache_1     | 1:M 21 Oct 2023 09:58:42.800 * monotonic clock: POSIX clock_gettime
cache_1     | 1:M 21 Oct 2023 09:58:42.803 * Running mode=standalone, port=6379.
cache_1     | 1:M 21 Oct 2023 09:58:42.804 * Server initialized
cache_1     | 1:M 21 Oct 2023 09:58:42.804 * Loading RDB produced by version 7.2.2
cache_1     | 1:M 21 Oct 2023 09:58:42.804 * RDB age 15 seconds
cache_1     | 1:M 21 Oct 2023 09:58:42.804 * RDB memory usage when created 1.80 Mb
cache_1     | 1:M 21 Oct 2023 09:58:42.807 * Done loading RDB, keys loaded: 348, keys expired: 0.
cache_1     | 1:M 21 Oct 2023 09:58:42.808 * DB loaded from disk: 0.004 seconds
cache_1     | 1:M 21 Oct 2023 09:58:42.808 * Ready to accept connections tcp
database_1  |
database_1  | PostgreSQL Database directory appears to contain a database; Skipping initialization
database_1  |
database_1  | 2023-10-21 09:58:42.927 UTC [1] FATAL:  database files are incompatible with server
database_1  | 2023-10-21 09:58:42.927 UTC [1] DETAIL:  The data directory was initialized by PostgreSQL version 15, which is not compatible with this version 16.0.
database_1  |
database_1  | PostgreSQL Database directory appears to contain a database; Skipping initialization
database_1  |
database_1  | 2023-10-21 09:58:44.184 UTC [1] FATAL:  database files are incompatible with server
database_1  | 2023-10-21 09:58:44.184 UTC [1] DETAIL:  The data directory was initialized by PostgreSQL version 15, which is not compatible with this version 16.0.
database_1  |
database_1  | PostgreSQL Database directory appears to contain a database; Skipping initialization
database_1  |
database_1  | 2023-10-21 09:58:45.393 UTC [1] FATAL:  database files are incompatible with server
database_1  | 2023-10-21 09:58:45.393 UTC [1] DETAIL:  The data directory was initialized by PostgreSQL version 15, which is not compatible with this version 16.0.
database_1  |
database_1  | PostgreSQL Database directory appears to contain a database; Skipping initialization
database_1  |
database_1  | 2023-10-21 09:58:46.971 UTC [1] FATAL:  database files are incompatible with server
database_1  | 2023-10-21 09:58:46.971 UTC [1] DETAIL:  The data directory was initialized by PostgreSQL version 15, which is not compatible with this version 16.0.
weblate_database exited with code 1
database_1  |
database_1  | PostgreSQL Database directory appears to contain a database; Skipping initialization
database_1  |
database_1  | 2023-10-21 09:58:51.478 UTC [1] FATAL:  database files are incompatible with server
database_1  | 2023-10-21 09:58:51.478 UTC [1] DETAIL:  The data directory was initialized by PostgreSQL version 15, which is not compatible with this version 16.0.
database_1  |
database_1  | PostgreSQL Database directory appears to contain a database; Skipping initialization
database_1  |
database_1  | 2023-10-21 09:58:55.665 UTC [1] FATAL:  database files are incompatible with server
database_1  | 2023-10-21 09:58:55.665 UTC [1] DETAIL:  The data directory was initialized by PostgreSQL version 15, which is not compatible with this version 16.0.
weblate_database exited with code 1
weblate     | System check identified no issues (1 silenced).
database_1  |
database_1  | PostgreSQL Database directory appears to contain a database; Skipping initialization
database_1  |
database_1  | 2023-10-21 09:59:03.107 UTC [1] FATAL:  database files are incompatible with server
database_1  | 2023-10-21 09:59:03.107 UTC [1] DETAIL:  The data directory was initialized by PostgreSQL version 15, which is not compatible with this version 16.0.
weblate_database exited with code 1
weblate     | psql: error: could not translate host name "database" to address: Name or service not known
database_1  |
database_1  | PostgreSQL Database directory appears to contain a database; Skipping initialization
database_1  |
database_1  | 2023-10-21 09:59:17.016 UTC [1] FATAL:  database files are incompatible with server
database_1  | 2023-10-21 09:59:17.016 UTC [1] DETAIL:  The data directory was initialized by PostgreSQL version 15, which is not compatible with this version 16.0.
weblate_database exited with code 1
weblate     | System check identified no issues (1 silenced).
database_1  |
database_1  | PostgreSQL Database directory appears to contain a database; Skipping initialization
database_1  |
database_1  | 2023-10-21 09:59:43.639 UTC [1] FATAL:  database files are incompatible with server
database_1  | 2023-10-21 09:59:43.639 UTC [1] DETAIL:  The data directory was initialized by PostgreSQL version 15, which is not compatible with this version 16.0.
weblate_database exited with code 1
weblate     | psql: error: could not translate host name "database" to address: Name or service not known
weblate exited with code 2
weblate     | System check identified no issues (1 silenced).
weblate     | psql: error: could not translate host name "database" to address: Name or service not known
weblate exited with code 2
weblate     | System check identified no issues (1 silenced).
database_1  |
database_1  | PostgreSQL Database directory appears to contain a database; Skipping initialization
database_1  |
database_1  | 2023-10-21 10:00:35.855 UTC [1] FATAL:  database files are incompatible with server
database_1  | 2023-10-21 10:00:35.855 UTC [1] DETAIL:  The data directory was initialized by PostgreSQL version 15, which is not compatible with this version 16.0.
weblate_database exited with code 1
weblate     | psql: error: could not translate host name "database" to address: Name or service not known
weblate exited with code 2
weblate     | System check identified no issues (1 silenced).
weblate     | psql: error: could not translate host name "database" to address: Name or service not known
weblate exited with code 2


### Additional context

Overriding the database image in `docker-compose.override.yml` and set it to `image: postgres:15-alpine` fixes it, for the time being …

no matching manifest for linux/arm/v7 in the manifest list entries

Describe the issue

Hello,

I have a
no matching manifest for linux/arm/v7 in the manifest list entries with the docker compose up with my rpi4

I already tried

  • I've read and searched the documentation.
  • I've searched for similar issues in this repository.

Steps to reproduce the behavior

follow Getting started instructions on my rpi4

Expected behavior

docker compose should run

Screenshots

No response

Exception traceback

No response

Additional context

No response

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

This repository currently has no open or pending branches.

Detected dependencies

docker-compose
docker-compose-https.yml
  • postgres 16-alpine
  • redis 7-alpine
  • steveltn/https-portal 1
docker-compose-split.yml
  • postgres 16-alpine
  • redis 7-alpine
docker-compose.yml
  • postgres 16-alpine
  • redis 7-alpine
github-actions
.github/workflows/closing.yml
  • peter-evans/create-or-update-comment v4
  • peter-evans/create-or-update-comment v4
  • ubuntu 22.04
.github/workflows/dockerimage.yml
  • actions/checkout v4
  • actions/checkout v4
  • ubuntu 22.04
  • ubuntu 22.04
.github/workflows/label-sync.yml
  • actions/checkout v4
  • srealmoreno/label-sync-action v1
  • ubuntu 22.04
.github/workflows/labels.yml
  • peter-evans/create-or-update-comment v4
  • peter-evans/create-or-update-comment v4
  • peter-evans/create-or-update-comment v4
  • peter-evans/create-or-update-comment v4
  • peter-evans/create-or-update-comment v4
  • ubuntu 22.04
.github/workflows/pre-commit.yml
  • actions/checkout v4
  • actions/cache v4
  • actions/setup-python v5
  • ubuntu 22.04
.github/workflows/pull_requests.yaml
  • peter-evans/enable-pull-request-automerge v3
.github/workflows/stale.yml
  • actions/stale v9
  • ubuntu 22.04
.github/workflows/super-linter.yml
  • actions/checkout v4
  • github/super-linter v5.0.0
  • ubuntu 22.04
pip_requirements
requirements-lint.txt
  • pre-commit ==3.7.1
pre-commit
.pre-commit-config.yaml
  • pre-commit/pre-commit-hooks v4.6.0
  • adrienverge/yamllint v1.35.1
  • macisamuele/language-formatters-pre-commit-hooks v2.13.0
  • executablebooks/mdformat 0.7.17
  • shellcheck-py/shellcheck-py v0.10.0.1
regex
.pre-commit-config.yaml
  • mdformat-gfm 0.3.6
  • mdformat-black 0.1.1
  • mdformat-shfmt 0.1.0

  • Check this box to trigger a request for Renovate to run again on this repository

How to debug LDAP authentication?

I have setup the necessary LDAP config in docker-compose.override.yml, however the LDAP authentication still fails with

This username/password combination was not found. Please try again.

I have switched on WEBLATE_DEBUG, but there seems to be no way to debug where it falls exactly. Do I need to enable the LDAP authentication somehow? If so, how can I do that when deploying with docker-compose?

Setting AUTHENTICATION_BACKENDS (https://docs.weblate.org/en/weblate-3.10/admin/auth.html#ldap-auth) seems not to work in the environment file (format is unclear as well).

Not possible to not listen on external port 80

The docker-compose.override.yaml can only extend the ports values and not replace them.
So it is not possible to not make weblate listening on port 80 (without editing docker-compose.yaml) which is not convenient when we put weblate behind a proxy.
I think it will be better to leave ports empty in docker-compose.yaml and add it as example in the docker-compose.override.yaml.

Unknown docker installation requirements

Describe the bug
Nowhere in the documentation there is a mention of what version of docker is required

To Reproduce

Install current version of Debian (stretch)

# apt-get install docker
# apt-get install docker-compose
# git clone https://github.com/WeblateOrg/docker-compose.git weblate-docker
# cd weblate-docker
# docker-compose up
ERROR: Version in "./docker-compose.yml" is unsupported. You might be seeing this error because you're using the wrong Compose file version. Either specify a version of "2" (or "2.0") and place your service definitions under the `services` key, or omit the `version` key and place your service definitions at the root of the file to use version 1.
For more on the Compose file format versions, see https://docs.docker.com/compose/compose-file/

My guess is that docker is too old version in current Debian?


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

WEBLATE_DEBUG is true

Describe the issue

Looking at the env, it seems WEBLATE_DEBUG=1 is set in the main environment file.

At least on my reading, I was going to just follow the guide and deploy this publicly.

It might be good to add a big warning somewhere or make this 0 in the default/recommended setup?

I already tried

  • I've read and searched the documentation.
  • I've searched for similar issues in this repository.

Steps to reproduce the behavior

  1. Go to '...'
  2. Scroll down to '...'
  3. Click on '...'
  4. See error

Expected behavior

No response

Screenshots

No response

Exception traceback

No response

Additional context

No response

Unable to disable TLSv1, TLSv1.1 & unsafe ciphers.

Describe the issue

I'm unable to disable unsafe SSL protocols & ciphers with the https config, while this should be working out of the box.

I already tried

Hi there!
I'm trying to set up Weblate in conjunction with https-portal for the automated certs. At the same time I need to disable TLSv1, TLSv1.1 and certain unsafe ciphers due to compliance reqs, so basically the equivalent of an Intermediate SSL config as detailed here. Luckily https-portal should be restrictive by default (and enable TLSv1.3 as of v1.7.0). However, after spinning up a docker-compose-https and running an SSL Labs scan I'm still seeing TLSv1, TLSv1.1 as active, and TLSv1.3 as unsupported.

image

I've tried all sorts of config changes in the https-portal container and honestly I'm at a loss at what the cause could be.
When inspecting the Weblate container I can see that it's running the ~default nginx config which enables TLSv1, TLSv1.1 and TLSv1.2 (same as the SSL Labs report) but as far as I understand this should not be relevant in the reverse proxy setup. Would anyone be able to shed more light on this?

Additionally, perhaps it would make sense to disable these by default in Weblate, as TLSv1 and TLSv1.1 are considered insecure and EOL.

To Reproduce the issue

Steps to reproduce the behavior:

  1. Run a sudo docker-compose -f docker-compose-https.yml -f docker-compose-https.override.yml up -d
  2. Go to SSL Labs and run a test on the spun up instance
  3. Scroll down to the supported protocols
  4. See TLSv1 & TLSv1.1 in the list

CACHE after pull of redis 6.2.4 will not start. Complains FATAL CONFIG ERROR

Describe the issue
After doing the latest docker-compose pull for weblate, database and cache, the cache would not start. When reviewing the stderr output in Docker the system complains:

Attaching to cache_1
cache_1  |
cache_1  | *** FATAL CONFIG FILE ERROR (Redis 6.2.4) ***
cache_1  | Reading the configuration file, at line 2
cache_1  | >>> 'appendonly "yes" "redis-server"'
cache_1  | wrong number of arguments
cache_1 exited with code 1

I already tried

Describe the steps you tried to solve the problem yourself.

  • I tried to change the command to command: redis-server --appendonly yes as some other docker compose files do for redis. This still had the same error message.
  • I removed the command: ["redis-server", "--appendonly", "yes"] code and then ran docker compose up cache --force-recreate and the cache image loaded.
  • I logged into the cache image to see if I code run the redis-server command manually. It produced an error about it already running.
  • I left the cache without the command: ["redis-server", "--appendonly", "yes"] code in the docker-compose.override.yml file
  • I ran a docker compose up --force-recreate command on all of the images.
  • The system ran as expected.

Not sure if I missed a step or if something changed with 6.2.4.

To Reproduce the issue

docker compose pull
Pulling weblate
Pulling database
Pulling cache

Expected behavior
I expected the system to pull all the latest versions of the software, reload the configuration files and start up without issue.
It did not.

Incompatible PostgreSQL version

Hi I've followed those steps to setup a weblate docker.

https://docs.weblate.org/en/latest/admin/install/docker.html#quick-docker

When launching with docker-compose up, I have the following errors :

weblate-docker_database_1 exited with code 1
database_1  | 2019-11-04 09:08:58.020 UTC [1] FATAL:  database files are incompatible with server
database_1  | 2019-11-04 09:08:58.020 UTC [1] DETAIL:  The data directory was initialized by PostgreSQL version 9.6, which is not compatible with this version 11.5.
database_1  | 2019-11-04 09:09:00.176 UTC [1] FATAL:  database files are incompatible with server
database_1  | 2019-11-04 09:09:00.176 UTC [1] DETAIL:  The data directory was initialized by PostgreSQL version 9.6, which is not compatible with this version 11.5.
weblate-docker_database_1 exited with code 1

Seems like there is some incompatibility with PostgreSQL database files.

Could this be because of this commit 1977f14 ?

Invalid database name

Describe the issue

When using custom configuration for Postgres (database, user and password), Weblate container will stop because it will not be able to connect to database.

For example if I use the following values in ./environment, then Weblate container will never start properly:

POSTGRES_DATABASE=weblate
POSTGRES_USER=wluser
POSTGRES_PASSWORD=wlpass

The reason is that in Postgres 16 the default environment variable for declaring a database is POSTGRES_DB and not POSTGRES_DATABASE.

According to Postgres documentation:

POSTGRES_DB
This optional environment variable can be used to define a different name for the default database that is created when the image is first started. If it is not specified, then the value of POSTGRES_USER will be used.

The default ./environment values will work because you are using the same value for database, username and password.

I already tried

  • I've read and searched the documentation.
  • I've searched for similar filed issues in this repository.

Steps to reproduce the behavior

  1. Clone the weblate-docker repo.
  2. Edit ./environment and use different values for POSTGRES_DATABASE, POSTGRES_USER and POSTGRES_PASSWORD.
  3. Execute docker compose up.
  4. You will see Weblate will never start because it can't establish a connection with database due to unknown database.

Expected behavior

Weblate container must start properly.

Screenshots

As you can see Postgress creates database wluser instead of weblate because POSTGRES_DB is not used.

image

Exception traceback

No response

Additional context

No response

Unable to start the container

Describe the issue

After docker compose up
The webplate image does not start and crashes.
The error is within ImportError: libtesseract.so.4: cannot open shared object file: No such file or directory

Running m1 macbook pro.

I already tried

  • I've read and searched the documentation.
  • I've searched for similar issues in this repository.

Steps to reproduce the behavior

Follow the Documentation setup.

Expected behavior

I expect the image to run successfully.

Screenshots

No response

Exception traceback

2023-09-07 13:16:50,830: WARNING/10] Handled exception: ImportError: libtesseract.so.4: cannot open shared object file: No such file or directory
Traceback (most recent call last):
  File "/usr/local/bin/weblate", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/local/lib/python3.11/site-packages/weblate/runner.py", line 19, in main
    utility.execute()
  File "/usr/local/lib/python3.11/site-packages/django/core/management/__init__.py", line 436, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python3.11/site-packages/django/core/management/base.py", line 412, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python3.11/site-packages/django/core/management/base.py", line 458, in execute
    output = self.handle(*args, **options)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/django/core/management/commands/check.py", line 76, in handle
    self.check(
  File "/usr/local/lib/python3.11/site-packages/django/core/management/base.py", line 485, in check
    all_issues = checks.run_checks(
                 ^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/django/core/checks/registry.py", line 88, in run_checks
    new_errors = check(app_configs=app_configs, databases=databases)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/django/core/checks/urls.py", line 14, in check_url_config
    return check_resolver(resolver)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/django/core/checks/urls.py", line 24, in check_resolver
    return check_method()
           ^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/django/urls/resolvers.py", line 494, in check
    for pattern in self.url_patterns:
                   ^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/django/utils/functional.py", line 57, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
                                         ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/django/urls/resolvers.py", line 715, in url_patterns
    patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
                       ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/django/utils/functional.py", line 57, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
                                         ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/django/urls/resolvers.py", line 708, in urlconf_module
    return import_module(self.urlconf_name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/usr/local/lib/python3.11/site-packages/weblate/urls.py", line 25, in <module>
    import weblate.screenshots.views
  File "/usr/local/lib/python3.11/site-packages/weblate/screenshots/views.py", line 39, in <module>
    from tesserocr import OEM, PSM, RIL, PyTessBaseAPI, iterate_level
ImportError: libtesseract.so.4: cannot open shared object file: No such file or directory
Failed to load configuration, please see errors above.
[2023-09-07 13:16:56,679: WARNING/9] Handled exception: ImportError: libtesseract.so.4: cannot open shared object file: No such file or directory
Traceback (most recent call last):
  File "/usr/local/bin/weblate", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/local/lib/python3.11/site-packages/weblate/runner.py", line 19, in main
    utility.execute()
  File "/usr/local/lib/python3.11/site-packages/django/core/management/__init__.py", line 436, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python3.11/site-packages/django/core/management/base.py", line 412, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python3.11/site-packages/django/core/management/base.py", line 458, in execute
    output = self.handle(*args, **options)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/django/core/management/commands/check.py", line 76, in handle
    self.check(
  File "/usr/local/lib/python3.11/site-packages/django/core/management/base.py", line 485, in check
    all_issues = checks.run_checks(
                 ^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/django/core/checks/registry.py", line 88, in run_checks
    new_errors = check(app_configs=app_configs, databases=databases)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/django/core/checks/urls.py", line 14, in check_url_config
    return check_resolver(resolver)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/django/core/checks/urls.py", line 24, in check_resolver
    return check_method()
           ^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/django/urls/resolvers.py", line 494, in check
    for pattern in self.url_patterns:
                   ^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/django/utils/functional.py", line 57, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
                                         ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/django/urls/resolvers.py", line 715, in url_patterns
    patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
                       ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/django/utils/functional.py", line 57, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
                                         ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/django/urls/resolvers.py", line 708, in urlconf_module
    return import_module(self.urlconf_name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/usr/local/lib/python3.11/site-packages/weblate/urls.py", line 25, in <module>
    import weblate.screenshots.views
  File "/usr/local/lib/python3.11/site-packages/weblate/screenshots/views.py", line 39, in <module>
    from tesserocr import OEM, PSM, RIL, PyTessBaseAPI, iterate_level
ImportError: libtesseract.so.4: cannot open shared object file: No such file or directory
Failed to load configuration, please see errors above.

Additional context

No response

Configuration in /etc/ssl/openssl.cnf ignored, can't send mail

Describe the issue

Hi,
I'm updating a weblate installation (from version 2.12). I've successfully reached version 4.10.1-1 by using the docker containers, however I can't get sending mails to work. The issue is that now weblate can't send mail, here's the relevant error message out of the docker container:

check stderr | ?: (weblate.E003) Cannot send e-mail ([SSL: DH_KEY_TOO_SMALL] dh key too small (_ssl.c:997)), please check EMAIL_* settings.

Here's the relevant part of the docker-compose.override.yml file:

      WEBLATE_EMAIL_PORT: 587
      WEBLATE_EMAIL_USE_TLS: 1
      WEBLATE_EMAIL_HOST_USER: '[email protected]'
      WEBLATE_EMAIL_HOST_PASSWORD: "yes_a_password_is_here"

Openssl (executed inside the container) also complains:

$ openssl s_client -connect mail.somewhere.tld:587 -starttls smtp | grep 'dh key'
depth=2 C = US, O = Internet Security Research Group, CN = ISRG Root X1
verify return:1
depth=1 C = US, O = Let's Encrypt, CN = R3
verify return:1
depth=0 CN = mail.somewhere.tld
verify return:1
140229475751232:error:141A318A:SSL routines:tls_process_ske_dhe:dh key too small:../ssl/statem/statem_clnt.c:2156:
$

Our mail server seems to have a short DH key, which should have been worked around by changing a value in /etc/ssl/openssl.cnf:

docker exec --user root -it weblate-docker_weblate_1 bash -c "sed -i 's#^CipherString = DEFAULT@SECLEVEL=2#CipherString = DEFAULT@SECLEVEL=1#' /etc/ssl/openssl.cnf"

The above successfully changes the value and once done, openssl (executed inside the container) no longer complains:

$ openssl s_client -connect mail.somewhere.tld:587 -starttls smtp | grep 'dh key'
depth=2 C = US, O = Internet Security Research Group, CN = ISRG Root X1
verify return:1
depth=1 C = US, O = Let's Encrypt, CN = R3
verify return:1
depth=0 CN = mail.somewhere.tld
verify return:1
250 SIZE 0
^C
$

which to me means that the docker container is now OK with the short DH key, however weblate for some reason does not respect the new content of openssl.cnf, even after I restart its docker container. I tried restarting the whole VM that hosts this with no luck.

Could you please assist me with that, or give me some hints as to what I might have done wrong, etc?

In case you need more info, I'll provide that as soon as I can.

Regards,
Plamen

I already tried

  • I've read and searched the documentation.
  • I've searched for similar issues in this repository.

Steps to reproduce the behavior

  1. Get weblate 4.10 as a docker container
  2. Have an old mail server with a short DH key
  3. Try sending a letter or just wait for weblate's automatic check to see it's unable to send letters
  4. Change the openssl.cnf file
  5. Try step 3 again, no luck

Expected behavior

Once /etc/ssl/openssl.cnf is updated, I expect the weblate docker container to respect this file's contents.

Screenshots

No response

Exception traceback

No response

Additional context

No response

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.