Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation for overriding settings by extending the Docker image is outdated #13190

Closed
2 tasks done
Earthcomputer opened this issue Dec 4, 2024 · 2 comments
Closed
2 tasks done
Assignees
Labels
documentation Improvements or additions to the documentation.
Milestone

Comments

@Earthcomputer
Copy link

Describe the issue

I tried following https://docs.weblate.org/en/latest/admin/install/docker.html#overriding-settings-by-extending-the-docker-image but after running docker-compose up it errors with

# docker-compose up
Creating network "weblate_default" with the default driver
Building weblate
[+] Building 0.2s (7/7) FINISHED                                                                                                                                                                     docker:default
 => [internal] load build definition from Dockerfile                                                                                                                                                           0.0s
 => => transferring dockerfile: 279B                                                                                                                                                                           0.0s
 => [internal] load metadata for docker.io/weblate/weblate:latest                                                                                                                                              0.0s
 => [internal] load .dockerignore                                                                                                                                                                              0.0s
 => => transferring context: 2B                                                                                                                                                                                0.0s
 => [internal] load build context                                                                                                                                                                              0.0s
 => => transferring context: 1.49kB                                                                                                                                                                            0.0s
 => [1/3] FROM docker.io/weblate/weblate:latest                                                                                                                                                                0.0s
 => [2/3] COPY weblate_customization /usr/src/weblate_customization                                                                                                                                            0.0s
 => ERROR [3/3] RUN /app/venv/bin/uv pip install --no-cache-dir /usr/src/weblate_customization                                                                                                                 0.2s
------                                                                                                                                                                                                              
 > [3/3] RUN /app/venv/bin/uv pip install --no-cache-dir /usr/src/weblate_customization:
0.138 + /app/venv/bin/uv pip install --no-cache-dir /usr/src/weblate_customization
0.138 /bin/bash: line 1: /app/venv/bin/uv: No such file or directory
------
Dockerfile:6
--------------------
   4 |     
   5 |     COPY weblate_customization /usr/src/weblate_customization
   6 | >>> RUN /app/venv/bin/uv pip install --no-cache-dir /usr/src/weblate_customization
   7 |     ENV DJANGO_SETTINGS_MODULE=weblate_customization.settings
   8 |     
--------------------
ERROR: failed to solve: process "/bin/bash -o pipefail -x -c /app/venv/bin/uv pip install --no-cache-dir /usr/src/weblate_customization" did not complete successfully: exit code: 127
ERROR: Service 'weblate' failed to build : Build failed

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 repository.
  2. Follow the instructions in the docs.
  3. Try to build and start the docker container with docker-compose up.

Expected behavior

The docker image doesn't fail to build and weblate starts normally.

Screenshots

No response

Exception traceback

No response

How do you run Weblate?

Docker container

Weblate versions

This is from before I use the customized image. I can't get the version from after because I can't start the container.

WARN[0000] /srv/weblate/docker-compose.override.yml: the attribute version is obsolete, it will be ignored, please remove it to avoid potential confusion

  • Weblate: 5.8.4
  • Django: 5.1.3
  • siphashc: 2.5
  • translate-toolkit: 3.14.1
  • lxml: 5.3.0
  • pillow: 11.0.0
  • nh3: 0.2.18
  • python-dateutil: 2.9.0.post0
  • social-auth-core: 4.5.4
  • social-auth-app-django: 5.4.2
  • django-crispy-forms: 2.3
  • oauthlib: 3.2.2
  • django-compressor: 4.5.1
  • djangorestframework: 3.15.2
  • django-filter: 24.3
  • django-appconf: 1.0.6
  • user-agents: 2.2.0
  • filelock: 3.16.1
  • RapidFuzz: 3.10.1
  • openpyxl: 3.1.5
  • celery: 5.4.0
  • django-celery-beat: 2.7.0
  • kombu: 5.4.2
  • translation-finder: 2.19
  • weblate-language-data: 2024.14
  • html2text: 2024.2.26
  • pycairo: 1.27.0
  • PyGObject: 3.50.0
  • diff-match-patch: 20241021
  • requests: 2.32.3
  • django-redis: 5.4.0
  • hiredis: 3.0.0
  • sentry-sdk: 2.18.0
  • Cython: 3.0.11
  • mistletoe: 1.4.0
  • GitPython: 3.1.43
  • borgbackup: 1.4.0
  • pyparsing: 3.2.0
  • ahocorasick_rs: 0.22.1
  • python-redis-lock: 4.0.0
  • charset-normalizer: 3.4.0
  • cyrtranslit: 1.1.1
  • drf-spectacular: 0.27.2
  • Python: 3.12.7
  • Git: 2.39.5
  • psycopg: 3.2.3
  • psycopg-binary: 3.2.3
  • phply: 1.2.6
  • ruamel.yaml: 0.18.6
  • tesserocr: 2.7.1
  • boto3: 1.35.65
  • aeidon: 1.15
  • iniparse: 0.5
  • mysqlclient: 2.2.6
  • google-cloud-translate: 3.18.0
  • openai: 1.54.5
  • Mercurial: 6.8.2
  • git-svn: 2.39.5
  • git-review: 2.4.0
  • PostgreSQL server: 17.2
  • Database backends: django.db.backends.postgresql
  • PostgreSQL implementation: psycopg3 (binary)
  • Cache backends: default:RedisCache, avatar:FileBasedCache
  • Email setup: django.core.mail.backends.smtp.EmailBackend: smtp.example.com
  • OS encoding: filesystem=utf-8, default=utf-8
  • Celery: redis://cache:6379/1, redis://cache:6379/1, regular
  • Platform: Linux 5.15.0-117-generic (x86_64)

Weblate deploy checks

Errors are because I haven't finished setting stuff up yet


WARN[0000] /srv/weblate/docker-compose.override.yml: the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion 
SystemCheckError: System check identified some issues:

CRITICALS:
?: (weblate.E003) Cannot send e-mail ([Errno -2] Name or service not known), please check EMAIL_* settings.
        HINT: https://docs.weblate.org/en/weblate-5.8.4/admin/install.html#out-mail
?: (weblate.E012) The server e-mail address should be changed from its default value
        HINT: https://docs.weblate.org/en/weblate-5.8.4/admin/install.html#production-email
?: (weblate.E013) The "From" e-mail address should be changed from its default value
        HINT: https://docs.weblate.org/en/weblate-5.8.4/admin/install.html#production-email

WARNINGS:
?: (security.W004) You have not set a value for the SECURE_HSTS_SECONDS setting. If your entire site is served only over SSL, you may want to consider setting a value and enabling HTTP Strict Transport Security. Be sure to read the documentation first; enabling HSTS carelessly can cause serious, irreversible problems.
?: (security.W008) Your SECURE_SSL_REDIRECT setting is not set to True. Unless your site should be available over both SSL and non-SSL connections, you may want to either set this setting True or configure a load balancer or reverse-proxy server to redirect all connections to HTTPS.
?: (security.W012) SESSION_COOKIE_SECURE is not set to True. Using a secure-only session cookie makes it more difficult for network traffic sniffers to hijack user sessions.

INFOS:
?: (weblate.I021) Error collection is not set up, it is highly recommended for production use
        HINT: https://docs.weblate.org/en/weblate-5.8.4/admin/install.html#collecting-errors
?: (weblate.I028) Backups are not configured, it is highly recommended for production use
        HINT: https://docs.weblate.org/en/weblate-5.8.4/admin/backup.html

System check identified 8 issues (12 silenced).


### Additional context

Not sure if this is the best place to report this but it's an issue with the documentation rather than an issue with weblate itself
@Earthcomputer Earthcomputer changed the title Documentation for verriding settings by extending the Docker image is outdated Documentation for overriding settings by extending the Docker image is outdated Dec 4, 2024
@Earthcomputer
Copy link
Author

Btw the dockerfile can be fixed by replacing the offending line with

RUN source /app/venv/bin/activate && uv pip install --no-cache-dir /usr/src/weblate_customization

just the docs need updating

@nijel nijel self-assigned this Dec 5, 2024
@nijel nijel added the documentation Improvements or additions to the documentation. label Dec 5, 2024
@nijel nijel added this to the 5.9 milestone Dec 5, 2024
@nijel nijel closed this as completed in b4ddc69 Dec 5, 2024
Copy link

github-actions bot commented Dec 5, 2024

Thank you for your report; the issue you have reported has just been fixed.

  • In case you see a problem with the fix, please comment on this issue.
  • In case you see a similar problem, please open a separate issue.
  • If you are happy with the outcome, don’t hesitate to support Weblate by making a donation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to the documentation.
Projects
None yet
Development

No branches or pull requests

2 participants