Erik Hubers [Sun, 11 Aug 2024 12:52:52 +0000 (14:52 +0200)]
#2: Build and publish Docker images using GitLab CI.
---
Add the ability to build & publish a docker image to the Gitlab
container registry when tagging a commit.
For now we'll publish both tag (i.e. `x.x.x`) and `latest` upon trigger.
It's assumed tags are only set on the default branch and only limited
amount people have tag rights. As it publishes `latest` it's important
not to push breaking / untested releases. If required a more elaborate
setup can be created, but let's start somewhere.
For now it's assumed in README.md files we're going to publish to the
GitLab Container Registry, with $CI_REGISTRY/$CI_REGISTRY_IMAGE
variables resolving to `registry.gitlab.com/jirafeau/jirafeau`.
Changes:
- Fixup of several pre-existing linter errors in `php` files
- Cleanup `Dockerfile`, merged `COPY` & `RUN` layers leveraging BuildKit
- Added `publish` pipeline step to be triggered using `tags`
- Updated docker image related references in `README.md`
- Refactored `.gitlab-ci.yaml` to only run `before_script` for linters
Allow multiple usernames when using HTTP authentication for the admin interface
Changed $cfg['admin_http_auth_user'] to an array to provide multiple usernames.
The option to provide a string here is preserved for backward compatibility.
Changes:
- Encryption using Sodium
- Key is generated using random_bytes() (cryptographically secure)
- Encryption is done using a second file, which is renamed after encryption is
complete (by using the same file, we would encrypt already encrypted data
again)
- A file encrypted using Sodium is marked with "C2" in the link file, so we can
distinguish them from files encrypted using mcrypt
ToDo:
- Error checking
- Show a warning in the admin interface if Sodium is not available
Fabien Clément [Wed, 8 Nov 2023 09:25:23 +0000 (09:25 +0000)]
mod_usertrack was deprecated and seems to be retired (currently installing from latest php 8.1 alpine image)
I remove it and application still seems to work as expected
Original warning:
> Files for translated languages are using ambiguous language codes.
> These language codes indicate a macrolanguage, and it is usually better to use the code of the individual language instead.
> Language code: ku
> Suggested individual language codes: ckb, kmr, sdh
I will arbitrally choose ckb because I ignore differences about those individual languages and I'am sorry for this.
Feel free to edit, open an issue or edit those individual languages.
Webblate git repository was conflicting with gitlab's origin since two release.
This induced a lot of conflicts which are now resolved in this single commit.
Weblate will be hard-based on this commit.
File hashing is a pretty intensive task both for CPU and disk.
This feature seems not to be a must have and can produce unwanted side effects.
Very large file can take a lot of time to be hashed at the end of transfert, producing protential timeouts and user frustration.
Users can still enable file deduplication feature by setting `file_hash` to `md5`.
[BUGFIX] Manage PHP configuration with "unlimited" upload
Setting `post_max_size` and `upload_max_filesize` PHP options to "0" is unmanaged by Jirafeau.
It tries to send 0 bytes and Javascript have some zero division errors.
This commit will use $max_upload_chunk_size_bytes option when available.
If $max_upload_chunk_size_bytes is also set to zero, chunk size is set an arbitrary value of 10M.
Non html-5 users will not have size limitation shown.
A new option `dark_style` is introduced to set which dark theme administrators want to user.
If administrator don"t want to use a dark mode, they can just set `dark_syle` and `style` option to the same value.
Hunter Fuller [Thu, 17 Mar 2022 04:17:42 +0000 (23:17 -0500)]
Add support for the X-Sendfile header/module to offload downloads.
With the appropriate config option enabled, Jirafeau will send the
X-Sendfile header instead of sending the file itself. As a result,
Apache/lighttpd will send the file without the intervention of Jirafeau,
and download resumes/seeking will also be enabled for this download.
If the user requested an encrypted file then this will not work, but it
should work in all other cases.
Nicky Galliano [Fri, 5 Feb 2021 10:11:06 +0000 (10:11 +0000)]
Update functions.php.
Following the update to php 8, I got the following debug error when trying to access my instance :
"Array and string offset access syntax with curly braces is no longer supported in [...]/jirafeau/lib/functions.php on line 31"
I just changed the deprecated curly braces into brackets and I was good to go.
Jerome Jutteau [Sat, 2 Jan 2021 23:18:20 +0000 (00:18 +0100)]
[FEATURE] more option docker options
closes #247
also:
- warn user about web_root configuration in docker
- no need to rewrite default options in docker
- option name is the same as Jirafeau but in CAPSLOCK