32 Commits

Author SHA1 Message Date
Florian Anceau
3670ad2fb8 Merge branch '75-libraries-name-fetched-from-the-environment-variables-are-not-formatted-to-lower-case' into 'master'
Format librairies name fetched from envvars to lower case.

Closes #75

See merge request flrnnc-oss/docker-seafile-client!22
2024-09-24 11:32:25 +00:00
Florian Anceau
062f57f002 Format librairies name fetched from envvars to lower case. 2024-09-24 11:32:24 +00:00
Florian Anceau
0b49050521 Fix build badge script ordering 2024-09-19 22:40:30 +00:00
Florian Anceau
62c80d3cac Merge branch 'fix--skip-ssl-cert' into 'master'
Fix skip SSL certificate parameter

Close #72

See merge request flrnnc-oss/docker-seafile-client!21
2024-09-19 21:51:17 +00:00
Florian Anceau
a86c629d64 Fix skip SSL certificate parameter 2024-09-19 21:51:17 +00:00
Florian Anceau
085e2db3d9 Fix usage of full_description. 2024-09-18 14:25:48 +00:00
Florian Anceau
327ee22307 Fix the docker-old filename, move the short description to CI/CD variables. 2024-09-17 21:42:02 +00:00
flowgunso
10e004a92d Update all links, close #70 2024-08-24 22:46:19 +02:00
flowgunso
0c186bea29 Apply proper documentation 2024-08-24 20:50:56 +02:00
flowgunso
fc3991a9cd Use appropriate document 2024-08-24 20:47:33 +02:00
flowgunso
377831b972 Fix path 2024-08-24 20:31:53 +02:00
flowgunso
afedea4c72 Fix the filename again 2024-08-24 20:18:29 +02:00
flowgunso
944c8c4ea9 Fix filename 2024-08-24 20:03:21 +02:00
flowgunso
e4e95c3bbc Push licencing years 2024-08-24 19:40:16 +02:00
flowgunso
7cd3eabdd6 Debug 2024-08-24 19:40:03 +02:00
flowgunso
95daece6a3 Add missing suffix for Docker tags 2024-08-24 19:08:40 +02:00
flowgunso
3323912c61 Fix CI/CD variables 2024-08-24 18:47:55 +02:00
Florian Anceau
0570e3965e Log changes 2024-08-24 14:42:12 +00:00
Florian Anceau
f423949bff Merge branch '68-migrate-to-flrnnc-docker-hub-organization' into 'master'
Migrate to flrnnc Docker Hub organization.

Closes #60 and #69

See merge request florian.anceau-oss/docker-seafile-client!20
2024-08-24 14:19:24 +00:00
Florian Anceau
659e102935 Migrate to flrnnc Docker Hub organization. 2024-08-24 14:19:24 +00:00
Florian Anceau
3375aca7dd Merge branch '61-create-a-last-build-date-badge' into 'master'
Update the build badge date on builds

Closes #61

See merge request florian.anceau-oss/docker-seafile-client!19
2024-06-27 06:37:33 +00:00
Florian Anceau
b2e855ec52 Update the build badge date on builds 2024-06-27 06:37:32 +00:00
Florian Anceau
214bb03a2b typo 2024-06-09 21:28:58 +00:00
Florian Anceau
a49cfccc7b Improve #53 2024-06-09 21:27:55 +00:00
Florian Anceau
b1a1c11676 Improved the readme #53 2024-06-09 21:14:15 +00:00
Florian Anceau
3bcd083837 Remove badges from the README 2024-06-09 21:03:54 +00:00
Florian Anceau
4cec73c7b8 Merge branch '54-latest-tag-was-not-published-on-docker-hub' into 'master'
Allow latest tag to be published, restrict SAST jobs to approved MR

Closes #54 and #58

See merge request florian.anceau-oss/docker-seafile-client!18
2024-06-09 12:57:15 +00:00
Florian Anceau
fe793698e7 Allow latest tag to be published, restrict SAST jobs to approved MR 2024-06-09 12:57:15 +00:00
Florian Anceau
bd098de313 Merge branch '62-use-the-badge-from-the-project-itself-rely-on-the-api-to-build-the-document' into 'master'
Use the badge from the project itself. Rely on the API to build the document

Closes #62

See merge request florian.anceau-oss/docker-seafile-client!17
2024-06-09 10:38:03 +00:00
Florian Anceau
0743bd7c21 Use the badge from the project itself. Rely on the API to build the document 2024-06-09 10:38:03 +00:00
Florian Anceau
eaa8a1edeb Merge branch '64-using-gid-100-early-exit-with-code-4' into 'master'
Change the users group GID from 100 to 90

Closes #64

See merge request florian.anceau-oss/docker-seafile-client!16
2024-06-06 20:56:51 +00:00
Florian Anceau
95aacc7847 Change the users group GID from 100 to 90 2024-06-06 20:56:51 +00:00
28 changed files with 390 additions and 182 deletions

View File

@@ -28,7 +28,7 @@ build:
extends: .parallel
rules:
- if: $CI_COMMIT_TAG
- if: $CI_MERGE_REQUEST_ID && $CI_MERGE_REQUEST_APPROVED != "true"
- if: $CI_MERGE_REQUEST_ID && $CI_MERGE_REQUEST_TITLE !~ /^Draft/
- if: $CI_PIPELINE_SOURCE == "schedule" && $SCHEDULED_PIPELINE == "weekly-build"
artifacts:
paths:
@@ -52,7 +52,7 @@ test:
- TARGET: unstable
rules:
- if: $CI_COMMIT_TAG
- if: $CI_MERGE_REQUEST_ID && $CI_MERGE_REQUEST_APPROVED != "true"
- if: $CI_MERGE_REQUEST_ID && $CI_MERGE_REQUEST_TITLE !~ /^Draft/
- if: $CI_PIPELINE_SOURCE == "schedule" && $SCHEDULED_PIPELINE == "weekly-build"
artifacts:
paths:
@@ -63,6 +63,7 @@ publish-images:
before_script:
- apk add bash git curl jq make
script:
- export
- make load
- make publish-images
needs:
@@ -77,15 +78,18 @@ publish-images:
rules:
- if: $CI_COMMIT_TAG
- if: $CI_PIPELINE_SOURCE == "schedule" && $SCHEDULED_PIPELINE == "weekly-build"
- when: never
artifacts:
paths:
- tarballs/
- versions/*
variables:
CI_DEBUG_TRACE: "true"
make-documents:
stage: release
before_script:
- apk add bash git curl jq make py3-jinja2
- apk add bash git curl jq make py3-jinja2 py3-gitlab
script:
- make documents
needs:
@@ -98,6 +102,7 @@ make-documents:
rules:
- if: $CI_COMMIT_TAG
- if: $CI_PIPELINE_SOURCE == "schedule" && $SCHEDULED_PIPELINE == "weekly-build"
- when: never
artifacts:
paths:
- versions/*
@@ -106,7 +111,7 @@ make-documents:
publish-documents:
stage: release
before_script:
- apk add bash git curl jq make
- apk add bash git curl jq make py3-gitlab
script:
- make publish-documents
needs:
@@ -114,6 +119,7 @@ publish-documents:
rules:
- if: $CI_COMMIT_TAG
- if: $CI_PIPELINE_SOURCE == "schedule" && $SCHEDULED_PIPELINE == "weekly-build"
- when: never
artifacts:
paths:
- documentations/*.md
@@ -128,6 +134,7 @@ weekly-build-disable:
- make unschedule-weekly-build
rules:
- if: $CI_PIPELINE_SOURCE == "schedule" && $SCHEDULED_PIPELINE == "weekly-build"
- when: never
weekly-build-scheduler:
@@ -138,10 +145,17 @@ weekly-build-scheduler:
- make schedule-weekly-build
rules:
- if: $CI_PIPELINE_SOURCE == "schedule" && $SCHEDULED_PIPELINE == "weekly-build-scheduler"
- when: never
artifacts:
reports:
metrics: metrics.txt
code_quality:
rules:
- if: $CI_MERGE_REQUEST_ID && $CI_MERGE_REQUEST_APPROVED != "true"
- if: $CI_MERGE_REQUEST_ID && $CI_MERGE_REQUEST_TITLE !~ /^Draft/
- when: never
semgrep-sast:
rules:
- if: $CI_MERGE_REQUEST_ID && $CI_MERGE_REQUEST_TITLE !~ /^Draft/
- when: never

View File

@@ -6,8 +6,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
<!-- To log a new version, copy, uncomment, add your changes, then add the tag shortcut at the end of the file
## [Unreleased]
<!-- To log a new version, copy, uncomment, add your changes, then add the tag shortcut at the end of the file -->
<!-- Unreleased --/>
## [Unreleased] - year-month-date
### Added
### Changed
### Deprecated
@@ -15,8 +16,87 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
### Security
[tag]: url_to_tag
-->
[Unreleased]: https://gitlab.com/flrnnc-oss/docker-seafile-client/-/releases/Unreleased
<!-- /Unreleased /-->
<!-- 3.4.0 -->
## [3.4.0] - 2024-09-24
### Added
- Explicit project name to mock Docker Compose.
### Fixed
- Librairies name are formatted to lower case (#75).
- Use for $TARGET in mock Docker Compose.
- Fix pipeline jobs rules, specifically on Draft MR.
[3.4.0]: https://gitlab.com/flrnnc-oss/docker-seafile-client/-/releases/3.4.0
<!-- /3.4.0 -->
<!-- 3.3.0 -->
## [3..0]
### Modified
* Add TARGET environment variable to Makefile commands.
### Fixed
* Fix the TypeError for the skip SSL certificates parameters.
[3.3.0]: https://gitlab.com/flrnnc-oss/docker-seafile-client/-/releases/3.3.0
<!-- /3.3.0 -->
<!-- 3.2.5 -->
## [3.2.5]
### Modified
* Use CI/CD environment variables for the Docker Hub short description
### Fixed
* The file name used for the Docker Hub full description
[3.2.5]: https://gitlab.com/flrnnc-oss/docker-seafile-client/-/releases/3.2.5
<!-- /3.2.5 -->
<!-- 3.2.4 -->
## [3.2.4]
### Added
* Publish to the new flrnnc/seafile-client repository.
* Write notices regarding the Docker repository move.
### Changed
* Use new CI/CD variables.
* Do not run pipelines on Draft MR. (#69)
### Removed
* Remove the changelog from the Seafile documentation.
[3.2.4]: https://gitlab.com/flrnnc-oss/docker-seafile-client/-/releases/3.2.4
<!-- /3.2.4 -->
## [3.2.3] - 2024/06/27
### Changed
- Update the build badge date on builds. (#61)
[3.2.3]: https://gitlab.com/flrnnc-oss/docker-seafile-client/-/releases/3.2.3
<!-- /3.2.3 -->
## [3.2.2] - 2024/06/09
### Fixed
- Allow the latest tag to be applied to the v9 versions. (#54)
- Restricted SAST jobs to approved pipelines. (#58)
[3.2.2]: https://gitlab.com/flrnnc-oss/docker-seafile-client/-/releases/3.2.2
<!-- /3.2.2 -->
## [3.2.1] - 2024/06/09
### Added
- Merge requests pipeline only runs when merge request has been approved.
### Changed
- Badges are rendered from the Gitlab project itself, not from code. (#62)
[3.2.1]: https://gitlab.com/flrnnc-oss/docker-seafile-client/-/releases/3.2.1
<!-- /3.2.1 -->
## [3.2.0] - 2024/06/06
### Changed
- Changed the group _users_ GID from 100 to 90. This allow to use the GID 100. (#64)
[3.2.0]: https://gitlab.com/flrnnc-oss/docker-seafile-client/-/releases/3.2.0
<!-- /3.2.0 -->
## [3.1.0] - 2024/06/02
### Changed
@@ -24,7 +104,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
- Instanciate the RPC client at the initialization (#63)
[3.1.0]: https://gitlab.com/florian.anceau/docker-seafile-client/-/tags/3.1.0
[3.1.0]: https://gitlab.com/flrnnc-oss/docker-seafile-client/-/releases/3.1.0
<!-- /3.1.0 -->
## [3.0.1] - 2024/05/27
@@ -32,9 +112,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* New script to schedule the best possible time to run the build. It relies on WattTime Load Shift feature (#56)
* Weekly build through pipeline schedules. (#56)
### Changed
* Every links pointing to the previous repository flwgns-docker/seafile-client are pointing now to florian.anceau/docker-seafile-client. (#56)
* Every links pointing to the previous repository flwgns-docker/seafile-client are pointing now to flrnnc-oss/docker-seafile-client. (#56)
[3.0.1]: https://gitlab.com/florian.anceau/docker-seafile-client/-/tags/3.0.1
[3.0.1]: https://gitlab.com/flrnnc-oss/docker-seafile-client/-/releases/3.0.1
<!-- /3.0.1 -->
## [3.0.0] - 2024/03/16
@@ -51,7 +131,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed the Docker Hub description publish through their API (#10)
- Add ca-certificates and gnupg to support more HTTP certificates (#24)
[3.0.0]: https://gitlab.com/florian.anceau/docker-seafile-client/-/tags/3.0.0
[3.0.0]: https://gitlab.com/flrnnc-oss/docker-seafile-client/-/releases/3.0.0
<!-- /3.0.0 -->
## [2.2.0] - 2022/08/26
@@ -121,23 +201,23 @@ The container entrypoint is run with root, then another entrypoint is run by the
## [0.9.2] - 2019/03/15
- Test release on GitLab, before Docker Hub
[2.2.0]: https://gitlab.com/florian.anceau/docker-seafile-client/-/tags/2.2.0
[2.1.1]: https://gitlab.com/florian.anceau/docker-seafile-client/-/tags/2.1.1
[2.1.0]: https://gitlab.com/florian.anceau/docker-seafile-client/-/tags/2.1.0
[2.0.3]: https://gitlab.com/florian.anceau/docker-seafile-client/-/tags/2.0.2
[2.0.2]: https://gitlab.com/florian.anceau/docker-seafile-client/-/tags/2.0.2
[2.0.1]: https://gitlab.com/florian.anceau/docker-seafile-client/-/tags/2.0.1
[2.0.0]: https://gitlab.com/florian.anceau/docker-seafile-client/-/tags/2.0.0
[1.2.1]: https://gitlab.com/florian.anceau/docker-seafile-client/-/tags/1.2.1
[1.2.0]: https://gitlab.com/florian.anceau/docker-seafile-client/-/tags/1.2.0
[1.1.2]: https://gitlab.com/florian.anceau/docker-seafile-client/-/tags/1.1.2
[1.1.1]: https://gitlab.com/florian.anceau/docker-seafile-client/-/tags/1.1.1
[1.1.0]: https://gitlab.com/florian.anceau/docker-seafile-client/-/tags/1.1.0
[1.0.6]: https://gitlab.com/florian.anceau/docker-seafile-client/-/tags/1.0.6
[1.0.5]: https://gitlab.com/florian.anceau/docker-seafile-client/-/tags/1.0.5
[1.0.4]: https://gitlab.com/florian.anceau/docker-seafile-client/-/tags/1.0.4
[1.0.3]: https://gitlab.com/florian.anceau/docker-seafile-client/-/tags/1.0.3
[1.0.2]: https://gitlab.com/florian.anceau/docker-seafile-client/-/tags/1.0.2
[1.0.1]: https://gitlab.com/florian.anceau/docker-seafile-client/-/tags/1.0.1
[1.0.0]: https://gitlab.com/florian.anceau/docker-seafile-client/-/tags/1.0.0
[0.9.2]: https://gitlab.com/florian.anceau/docker-seafile-client/-/tags/0.9.2
[2.2.0]: https://gitlab.com/flrnnc-oss/docker-seafile-client/-/releases/2.2.0
[2.1.1]: https://gitlab.com/flrnnc-oss/docker-seafile-client/-/releases/2.1.1
[2.1.0]: https://gitlab.com/flrnnc-oss/docker-seafile-client/-/releases/2.1.0
[2.0.3]: https://gitlab.com/flrnnc-oss/docker-seafile-client/-/releases/2.0.2
[2.0.2]: https://gitlab.com/flrnnc-oss/docker-seafile-client/-/releases/2.0.2
[2.0.1]: https://gitlab.com/flrnnc-oss/docker-seafile-client/-/releases/2.0.1
[2.0.0]: https://gitlab.com/flrnnc-oss/docker-seafile-client/-/releases/2.0.0
[1.2.1]: https://gitlab.com/flrnnc-oss/docker-seafile-client/-/releases/1.2.1
[1.2.0]: https://gitlab.com/flrnnc-oss/docker-seafile-client/-/releases/1.2.0
[1.1.2]: https://gitlab.com/flrnnc-oss/docker-seafile-client/-/releases/1.1.2
[1.1.1]: https://gitlab.com/flrnnc-oss/docker-seafile-client/-/releases/1.1.1
[1.1.0]: https://gitlab.com/flrnnc-oss/docker-seafile-client/-/releases/1.1.0
[1.0.6]: https://gitlab.com/flrnnc-oss/docker-seafile-client/-/releases/1.0.6
[1.0.5]: https://gitlab.com/flrnnc-oss/docker-seafile-client/-/releases/1.0.5
[1.0.4]: https://gitlab.com/flrnnc-oss/docker-seafile-client/-/releases/1.0.4
[1.0.3]: https://gitlab.com/flrnnc-oss/docker-seafile-client/-/releases/1.0.3
[1.0.2]: https://gitlab.com/flrnnc-oss/docker-seafile-client/-/releases/1.0.2
[1.0.1]: https://gitlab.com/flrnnc-oss/docker-seafile-client/-/releases/1.0.1
[1.0.0]: https://gitlab.com/flrnnc-oss/docker-seafile-client/-/releases/1.0.0
[0.9.2]: https://gitlab.com/flrnnc-oss/docker-seafile-client/-/releases/0.9.2

View File

@@ -13,13 +13,13 @@
They are several ways to help and improve this project.
## Report issues, propose features
You think you found a bug ? You think something is missing out ? Check that it has not been [already reported](https://gitlab.com/florian.anceau/docker-seafile-client/-/issues). If it has not, [report it](https://gitlab.com/florian.anceau/docker-seafile-client/-/issues/new?issue).
You think you found a bug ? You think something is missing out ? Check that it has not been [already reported](https://gitlab.com/flrnnc-oss/docker-seafile-client/-/issues). If it has not, [report it](https://gitlab.com/flrnnc-oss/docker-seafile-client/-/issues/new?issue).
## Solve problems
You can't wait for a problem to be solved ? Pick one from the [already reported problems](https://gitlab.com/florian.anceau/docker-seafile-client/-/issues) and solve it. It will be greatly appreciated!
You can't wait for a problem to be solved ? Pick one from the [already reported problems](https://gitlab.com/flrnnc-oss/docker-seafile-client/-/issues) and solve it. It will be greatly appreciated!
## Say thanks
One great way to help is simply to say thanks. You can do that by [adding a star to the Docker Hub repository](https://hub.docker.com/r/flowgunso/seafile-client) or [just saying thanks in the project topic on Seafile's forum](https://forum.seafile.com/t/docker-client-to-sync-files-with-containers/8573).
One great way to help is simply to say thanks. You can do that by [adding a star to the Docker Hub repository](https://hub.docker.com/r/flrnnc/seafile-client) or [just saying thanks in the project topic on Seafile's forum](https://forum.seafile.com/t/docker-client-to-sync-files-with-containers/8573).
# Project workflow
The ins and outs of the project, from setting up a local environment for developments to notifying users of changes.

View File

@@ -1,7 +1,7 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2019-2020 flow.gunso@gmail.com
Copyright (C) 2019-2024 florian.anceau@gmail.com
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.

View File

@@ -1,21 +1,26 @@
TARGET?=unstable
TARGET?=stable
# Mocking
mock:
docker compose -f tests/mock/compose.yaml up -d
TARGET=${TARGET} docker compose -f tests/mock/compose.yaml up -d
unmock:
docker compose -f tests/mock/compose.yaml down
TARGET=${TARGET} docker compose -f tests/mock/compose.yaml down
client:
docker compose -f tests/mock/compose.yaml rm -fs client
docker compose -f tests/mock/compose.yaml up -d client
TARGET=${TARGET} docker compose -f tests/mock/compose.yaml rm -fs client
TARGET=${TARGET} docker compose -f tests/mock/compose.yaml up -d client
shell:
docker compose -f tests/mock/compose.yaml exec client bash
TARGET=${TARGET} docker compose -f tests/mock/compose.yaml exec client bash
logs:
docker compose -f tests/mock/compose.yaml logs -f client
TARGET=${TARGET} docker compose -f tests/mock/compose.yaml logs -f client
ps:
TARGET=${TARGET} docker compose -f tests/mock/compose.yaml ps
# Build
build:
TARGET=${TARGET} CI_COMMIT_TAG=${CI_COMMIT_TAG} bash scripts/build-images.sh
@@ -25,17 +30,19 @@ build-test:
test:
docker run seafile-client:test
# CI/CD
documents:
python scripts/update-build-badge.py
python scripts/make-documents.py docker.md.j2
python scripts/make-documents.py docker-old.md.j2
python scripts/make-documents.py seafile.md.j2
publish-images:
TARGET=${TARGET} \
DOCKER_HUB_BOT_USERNAME=${DOCKER_HUB_BOT_USERNAME} \
DOCKER_HUB_BOT_TOKEN=${DOCKER_HUB_BOT_TOKEN} \
DOCKER_HUB_OWNER_USERNAME=${DOCKER_HUB_OWNER_USERNAME} \
DOCKER_HUB_OWNER_TOKEN=${DOCKER_HUB_OWNER_TOKEN} \
DOCKER_HUB_IMAGE=${DOCKER_HUB_IMAGE} \
DOCKER_REGISTRY_USERNAME=${DOCKER_REGISTRY_USERNAME} \
DOCKER_REGISTRY_TOKEN=${DOCKER_REGISTRY_TOKEN} \
DOCKER_REGISTRY_IMAGE_FLOWGUNSO=${DOCKER_REGISTRY_IMAGE_FLOWGUNSO} \
DOCKER_REGISTRY_IMAGE_FLRNNC=${DOCKER_REGISTRY_IMAGE_FLRNNC} \
bash scripts/publish-images.sh
publish-documents:
@@ -43,10 +50,12 @@ publish-documents:
save:
mkdir -p tarballs/
docker save --output tarballs/${TARGET}.tar seafile-client:${TARGET}
docker save --output tarballs/${TARGET}-flowgunso.tar seafile-client:${TARGET}-flowgunso
docker save --output tarballs/${TARGET}-flrnnc.tar seafile-client:${TARGET}-flrnnc
load:
docker load --input tarballs/${TARGET}.tar
docker load --input tarballs/${TARGET}-flowgunso.tar
docker load --input tarballs/${TARGET}-flrnnc.tar
schedule-weekly-build:
python scripts/schedule-build.py

View File

@@ -1,27 +1,12 @@
[![][badge-pipeline]][url-pipelines]
[![][badge-image-size]][url-docker]
[![][badge-pulls]][url-docker]
[![][badge-release]][url-sources]
[![][badge-license]][url-sources]
[![][badge-sponsoring]][url-sponsoring]
[url-pipelines]: https://gitlab.com/florian.anceau/docker-seafile-client/-/pipelines
[url-docker]: https://hub.docker.com/r/flowgunso/seafile-client
[url-sources]: https://gitlab.com/florian.anceau/docker-seafile-client/
[url-sponsoring]: https://liberapay.com/docker-seafile-client/donate
[badge-pipeline]: https://img.shields.io/gitlab/pipeline-status/flwgns-docker%2Fseafile-client
[badge-image-size]: https://img.shields.io/docker/image-size/flowgunso/seafile-client/latest?logo=docker&label=Image%20size&color=%230778b8
[badge-pulls]: https://img.shields.io/docker/pulls/flowgunso/seafile-client?logo=docker&label=Pulls&color=%230778b8
[badge-license]: https://img.shields.io/gitlab/license/11322291?label=License&color=fca326
[badge-release]: https://img.shields.io/gitlab/v/release/11322291?logo=gitlab&label=Source%20code&color=fca326
[badge-sponsoring]: https://img.shields.io/liberapay/receives/docker-seafile-client.svg?logo=liberapay
**Share a Seafile library as a volume to other containers.**
> ⚠️ Please consider sponsoring this project to help me maintaining and improving it. As of right now, you can support me through Liberay, available in the project badges
# Features
> This project is switching namespaces. The sources previously in [flwgnso-docker/docker-seafile-client](https://gitlab.com/flwgns-docker/seafile-client) are now in [flrnnc-oss/docker-seafile-client](https://gitlab.com/flrnnc-oss/docker-seafile-client). The Docker image can still be found at [flowgunso/seafile-client](https://hub.docker.com/r/flowgunso/seafile-client) but it will be deprecated, the image [flrnnc/seafile-client](https://hub.docker.com/r/flrnnc/seafile-client) should be used instead.
# Quick informations
_Docker Seafile client_ is a Docker image that provides a Seafile client to sync one or more library as volumes to other containers.
## Features
* Synchronize one or more Seafile libraries.
* Support password protected librairies.
* Support two factor authentication.
@@ -29,6 +14,14 @@
* Skip SSL certificates.
* Set file ownership with user/group ID
## Quick links
* Check out the [roadmap](https://gitlab.com/flrnnc-oss/docker-seafile-client/-/wikis/home#roadmap) to see what is anticipated.
* Check out how to [contribute](CONTRIBUTING.md).
* Report issues on [Gitlab](https://gitlab.com/flrnnc-oss/docker-seafile-client/).
* Ask questions on [Seafile forum](https://forum.seafile.com/t/docker-client-to-sync-files-with-containers/8573).
# Usage
## Start a Seafile client
@@ -43,7 +36,7 @@ docker run \
-e SEAF_LIBRARY="an-hexadecimal-library-uuid" \
-v path/to/library:/library \
-v path/to/client/data:/seafile \
flowgunso/seafile-client:latest
flrnnc/seafile-client:latest
```
### Docker Compose
@@ -54,7 +47,7 @@ version: "3"
services:
seafile-client:
image: flowgunso/seafile-client:latest
image: flrnnc/seafile-client:latest
volumes:
- audio:/library/audio
- documents:/library/documents
@@ -140,7 +133,7 @@ version: "3"
services:
seafile-client:
image: flowgunso/seafile-client:latest
image: flrnnc/seafile-client:latest
volumes:
- audio:/library/audio
- documents:/library/documents
@@ -164,7 +157,3 @@ volumes:
documents:
client:
```
# Troubleshooting
* Ask questions on [Seafile forum](https://forum.seafile.com/t/docker-client-to-sync-files-with-containers/8573).
* Contribute and report issues on [Gitlab](https://gitlab.com/florian.anceau/docker-seafile-client/).

View File

@@ -5,4 +5,4 @@ docker run \
-e SEAF_LIBRARY="an-hexadecimal-library-uuid" \
-v path/to/library:/library \
-v path/to/client/data:/seafile \
flowgunso/seafile-client:latest
flrnnc/seafile-client:latest

View File

@@ -3,7 +3,7 @@ version: "3"
services:
seafile-client:
image: flowgunso/seafile-client:latest
image: flrnnc/seafile-client:latest
volumes:
- audio:/library/audio
- documents:/library/documents

View File

@@ -3,7 +3,7 @@ version: "3"
services:
seafile-client:
image: flowgunso/seafile-client:latest
image: flrnnc/seafile-client:latest
volumes:
- audio:/library/audio
- documents:/library/documents

View File

@@ -0,0 +1,15 @@
{% include "parts/notices.md.j2" %}
{% include "parts/badges.md.j2" %}
**Share one or more Seafile libraries as a volume to other containers.**
{% include "parts/supported_tags.md.j2" %}
{% include "parts/features.md.j2" %}
{% include "parts/usage.md.j2" %}
{% include "parts/troubleshooting.md.j2" %}
{% include "parts/moving-to-another-namespace.md.j2" %}

View File

@@ -1,6 +1,6 @@
{% include "parts/badges.md.j2" %}
**Share a Seafile library as a volume to other containers.**
**Share one or more Seafile libraries as a volume to other containers.**
{% include "parts/supported_tags.md.j2" %}

View File

@@ -1,18 +1,3 @@
[![][badge-pipeline]][url-pipelines]
[![][badge-image-size]][url-docker]
[![][badge-pulls]][url-docker]
[![][badge-release]][url-sources]
[![][badge-license]][url-sources]
[![][badge-sponsoring]][url-sponsoring]
[url-pipelines]: https://gitlab.com/florian.anceau/docker-seafile-client/badges/master/pipeline.svg
[url-docker]: https://hub.docker.com/r/flowgunso/seafile-client
[url-sources]: https://gitlab.com/florian.anceau/docker-seafile-client/
[url-sponsoring]: https://liberapay.com/docker-seafile-client/donate
[badge-pipeline]: https://img.shields.io/gitlab/pipeline-status/florian.anceau%2Fdocker-seafile-client
[badge-image-size]: https://img.shields.io/docker/image-size/flowgunso/seafile-client/latest?logo=docker&label=Image%20size&color=%230778b8
[badge-pulls]: https://img.shields.io/docker/pulls/flowgunso/seafile-client?logo=docker&label=Pulls&color=%230778b8
[badge-license]: https://img.shields.io/gitlab/license/11322291?label=License&color=fca326
[badge-release]: https://img.shields.io/gitlab/v/release/11322291?logo=gitlab&label=Source%20code&color=fca326
[badge-sponsoring]: https://img.shields.io/liberapay/receives/docker-seafile-client.svg?logo=liberapay
{% for name, links in badges.items() -%}
[![{{name}}]({{links.image}})]({{links.link}})
{% endfor %}

View File

@@ -0,0 +1,5 @@
# Moving to another namespace
This repository is being moved to a new namespace [flrnnc](https://hub.docker.com/u/flrnnc).
I am applying to open source software programs on the service providers I rely on such as Gitlab and Docker. It means that my project must be reorganized. The `flrnnc` namespace is dedidacted to open source software I publish on Docker.

View File

@@ -0,0 +1,2 @@
> This repository will be moved to another namespace [flrnnc/seafile-client](https://hub.docker.com/repository/docker/flrnnc/seafile-client/).
> See [moving to another namespace](#moving-to-another-namespace]) for explanations.

View File

@@ -6,4 +6,4 @@ The versions match Seafile versions.
[{{ version | join(", ")}}][Dockerfile]
{% endfor %}
[Dockerfile]: https://gitlab.com/florian.anceau/docker-seafile-client/-/blob/master/seafile-client/Dockerfile
[Dockerfile]: https://gitlab.com/flrnnc-oss/docker-seafile-client/-/blob/master/seafile-client/Dockerfile

View File

@@ -1,3 +1,3 @@
# Troubleshooting
* Ask questions on [Seafile forum](https://forum.seafile.com/t/docker-client-to-sync-files-with-containers/8573).
* Contribute and report issues on [Gitlab](https://gitlab.com/florian.anceau/docker-seafile-client/).
* Contribute and report issues on [Gitlab](https://gitlab.com/flrnnc-oss/docker-seafile-client/).

View File

@@ -11,8 +11,14 @@ Example usage with docker-compose and for the docker cli are provided. Essential
Feedback is welcome so I can keep improving it.
# Quick informations
**[flowgunso/seafile-client](https://hub.docker.com/r/flowgunso/seafile-client)** on Docker Hub, latest stable version: **{{version}}**
Contribute and report issues on [Gitlab](https://gitlab.com/florian.anceau/docker-seafile-client/).
{% include "parts/badges.md.j2" %}
**Please use [u][flrnnc/seafile-client](https://hub.docker.com/r/flrnnc/seafile-client)[/u] instead of [u][flowgunso/seafile-client](https://hub.docker.com/r/flowgunso/seafile-client)[/u] from now on.**
This project is switching namespaces. The sources previously in [flwgnso-docker/docker-seafile-client](https://gitlab.com/flwgns-docker/seafile-client) are now in [flrnnc-oss/docker-seafile-client](https://gitlab.com/flrnnc-oss/docker-seafile-client). The Docker image can still be found at [flowgunso/seafile-client](https://hub.docker.com/r/flowgunso/seafile-client) but it will be deprecated, the image [flrnnc/seafile-client](https://hub.docker.com/r/flrnnc/seafile-client) should be used instead.
[flowgunso/seafile-client](https://hub.docker.com/r/flowgunso/seafile-client) will still be updated until usage is low enough to be archived.
{% include "parts/supported_tags.md.j2" %}
@@ -20,9 +26,4 @@ Contribute and report issues on [Gitlab](https://gitlab.com/florian.anceau/docke
{% include "parts/usage.md.j2" %}
{% include "parts/troubleshooting.md.j2" %}
# Changelog
[details]
{{changelog}}
[/details]
{% include "parts/troubleshooting.md.j2" %}

View File

@@ -1,7 +1,7 @@
#!/bin/bash
# Docker Seafile client, help you mount a Seafile library as a volume.
# Copyright (C) 2019-2020, flow.gunso@gmail.com
# Copyright (C) 2019-2024, florian.anceau@gmail.com
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -30,5 +30,12 @@ done
docker build \
$build_arguments \
--tag seafile-client:$TARGET \
--build-arg IMAGE=flowgunso \
--tag seafile-client:$TARGET-flowgunso \
seafile-client/
docker build \
$build_arguments \
--build-arg IMAGE=flrnnc \
--tag seafile-client:$TARGET-flrnnc \
seafile-client/

View File

@@ -2,54 +2,92 @@
from pathlib import Path
import argparse
import os
from jinja2 import Environment, FileSystemLoader
from gitlab import Gitlab
REPOSITORY_PATH = Path(__file__).parent.parent
# Argument parsing.
parser = argparse.ArgumentParser(prog="Seafile Docker client documentation renderer")
parser.add_argument("template", type=str)
args = parser.parse_args()
class DocumentMaker:
# Setup Jinja2 templater
documentations_path = REPOSITORY_PATH.joinpath("documentations")
loader = FileSystemLoader(documentations_path)
environment = Environment(loader=loader)
template = environment.get_template(args.template)
def __init__(self, filename: str) -> None:
# Intanciate the Jinja2 renderer.
self.directory = REPOSITORY_PATH.joinpath("documentations")
loader = FileSystemLoader(self.directory)
environment = Environment(loader=loader)
self.filename = filename
self.template = environment.get_template(filename)
# Instanciate the Gitlab session.
gitlab_project_id=os.environ["CI_PROJECT_ID"]
gitlab_private_token=os.environ["WEEKLY_BUILD_PRIVATE_TOKEN"]
self.gitlab = Gitlab(private_token=gitlab_private_token)
self.project = self.gitlab.projects.get(gitlab_project_id)
self.versions = []
self.badges = {}
def get_versions(self):
versions = []
for path in Path("versions").iterdir():
with open(path, "rt") as fo:
versions.append(fo.read().strip())
versions.sort(reverse=True)
# Prepare the render context.
latest = True
self.versions = []
for version in versions:
version = version.strip()
parts = version.split(".")
increments = []
blocks = []
for part in parts:
increments.append(part)
section = ".".join(increments)
blocks.append(f"`{section}`")
if latest:
blocks.append("`latest`")
latest = False
self.versions.append(blocks)
buffer=[]
for path in Path("versions").iterdir():
with open(path, "rt") as fo:
buffer.append(fo.read().strip())
buffer.sort(reverse=True)
def get_badges(self):
badges = self.project.badges.list()
# Prepare the render context.
latest = True
versions = []
for line in buffer:
version = line.strip()
parts = version.split(".")
increments = []
blocks = []
for part in parts:
increments.append(part)
section = ".".join(increments)
blocks.append(f"`{section}`")
if latest:
blocks.append("`latest`")
latest = False
versions.append(blocks)
for badge in badges:
name = badge.name
link = badge.rendered_link_url
image = badge.rendered_image_url
links = {"link": link, "image": image}
self.badges[name] = links
# Render
# TODO: read and adapt the CHANGELOG and insert into the render.
content = template.render(versions=versions)
#content = template.render() # When version/ is unavailable.
filename = Path(args.template).with_suffix("")
document = documentations_path.joinpath(filename)
# Write to file
with open(document, mode="w") as fo:
fo.write(content)
def render(self):
# Render
# TODO: read and adapt the CHANGELOG and insert into the render.
content = self.template.render(versions=self.versions, badges=self.badges)
#content = template.render() # When version/ is unavailable.
filename = Path(self.filename).with_suffix("")
path = self.directory.joinpath(filename)
# Write to file
with open(path, mode="w") as fo:
fo.write(content)
if __name__ == "__main__":
# Argument parsing.
parser = argparse.ArgumentParser(prog="Seafile Docker client documentation renderer")
parser.add_argument("template", type=str)
args = parser.parse_args()
maker = DocumentMaker(args.template)
maker.get_versions()
maker.get_badges()
maker.render()

View File

@@ -2,18 +2,29 @@
token=$(curl -s \
-X POST \
-H "Content-Type: application/json" \
-d '{"username": "'"$DOCKER_HUB_OWNER_USERNAME"'", "password": "'"$DOCKER_HUB_OWNER_TOKEN"'"}' \
-d '{"username": "'"$DOCKER_REGISTRY_USERNAME"'", "password": "'"$DOCKER_REGISTRY_TOKEN"'"}' \
https://hub.docker.com/v2/users/login/ | jq -r .token)
# Generate a JSON with the README.md as the full_description.
json=$(jq -n \
--arg readme "$(<documentations/docker.md)" \
'{"full_description": $readme,"description":"Synchronize a Seafile library. Support password protected librairies and 2FA authentication."}')
'{"full_description": $readme,"description": "'"$DOCKER_REGISTRY_DESCRIPTION_FLRNNC"'"}')
jsonOld=$(jq -n \
--arg readme "$(<documentations/docker-old.md)" \
'{"full_description": $readme,"description": "'"$DOCKER_REGISTRY_DESCRIPTION_FLOWGUNSO"'"}')
# Update the Docker Hub repository's full_description.
curl -siL \
-X PATCH \
-d "$jsonOld" \
-H "Content-Type: application/json" \
-H "Authorization: JWT $token" \
"https://hub.docker.com/v2/repositories/$DOCKER_REGISTRY_IMAGE_FLOWGUNSO/"
curl -siL \
-X PATCH \
-d "$json" \
-H "Content-Type: application/json" \
-H "Authorization: JWT $token" \
"https://hub.docker.com/v2/repositories/$DOCKER_HUB_IMAGE/"
"https://hub.docker.com/v2/repositories/$DOCKER_REGISTRY_IMAGE_FLRNNC/"

View File

@@ -1,7 +1,7 @@
# !/bin/bash
# Docker Seafile client, help you mount a Seafile library as a volume.
# Copyright (C) 2019-2020, flow.gunso@gmail.com
# Copyright (C) 2019-2024, florian.anceau@gmail.com
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -24,15 +24,8 @@ raise() {
exit 1
}
# Validate the required parameters.
# [[ -z "$DOCKER_HUB_BOT_USERNAME" ]] && raise "Missing DOCKER_HUB_BOT_USERNAME envvar."
# [[ -z "$DOCKER_HUB_BOT_TOKEN" ]] && raise "Missing DOCKER_HUB_BOT_TOKEN envvar."
# [[ -z "$DOCKER_HUB_OWNER_USERNAME" ]] && raise "Missing DOCKER_HUB_OWNER_USERNAME envvar."
# [[ -z "$DOCKER_HUB_OWNER_TOKEN" ]] && raise "Missing DOCKER_HUB_OWNER_TOKEN envvar."
# [[ -z "$DOCKER_HUB_IMAGE" ]] && raise "Missing DOCKER_HUB_IMAGE envvar"
# Grab version with the container
version="$(docker run --rm seafile-client:$TARGET cat -s /SEAFILE_VERSION)"
version="$(docker run --rm seafile-client:$TARGET-flrnnc cat -s /SEAFILE_VERSION)"
version="$(echo ${version%-*})"
# Output the version to an artifact for documentation rendering.
@@ -41,7 +34,7 @@ echo $version >> "versions/$TARGET"
# Generate version tags.
tags=()
#[[ "$TARGET" =~ "unstable" ]] && tags+=("latest")
[[ "$TARGET" =~ "unstable" ]] && tags+=("latest")
for version_component in $(echo $version | tr '.' '\n'); do
tag+="$version_component"
tags+=("$tag")
@@ -49,8 +42,13 @@ for version_component in $(echo $version | tr '.' '\n'); do
done
# Tag then push to the Docker Hub registry.
echo $DOCKER_HUB_BOT_TOKEN | docker login --password-stdin --username $DOCKER_HUB_BOT_USERNAME
echo $DOCKER_REGISTRY_TOKEN | docker login --password-stdin --username $DOCKER_REGISTRY_USERNAME
for tag in "${tags[@]}"; do
docker tag seafile-client:$TARGET $DOCKER_HUB_IMAGE:$tag
docker push $DOCKER_HUB_IMAGE:$tag
docker tag seafile-client:$TARGET-flowgunso $DOCKER_REGISTRY_IMAGE_FLOWGUNSO:$tag
docker push $DOCKER_REGISTRY_IMAGE_FLOWGUNSO:$tag
done
for tag in "${tags[@]}"; do
docker tag seafile-client:$TARGET-flrnnc $DOCKER_REGISTRY_IMAGE_FLRNNC:$tag
docker push $DOCKER_REGISTRY_IMAGE_FLRNNC:$tag
done

View File

@@ -0,0 +1,34 @@
# !/usr/bin/env python
import os
from datetime import datetime
from gitlab import Gitlab
class BuildBadgeUpdater:
def __init__(self, gitlab_private_token, gitlab_project_id, gitlab_build_badge_id):
# Instanciate the Gitlab session and grab the Weekly build scheduled pipeline.
self.gitlab = Gitlab(private_token=gitlab_private_token)
project = self.gitlab.projects.get(gitlab_project_id)
self.badge = project.badges.get(gitlab_build_badge_id)
def update(self):
now = datetime.now()
date = now.strftime(r"%Y--%m--%d")
image_url = f"https://img.shields.io/badge/_-{date}-_?label=last%20build&color=light-green"
self.badge.image_url = image_url
self.badge.save()
if __name__ == "__main__":
build_badge_updater = BuildBadgeUpdater(
gitlab_project_id=os.environ["CI_PROJECT_ID"],
gitlab_private_token=os.environ["WEEKLY_BUILD_PRIVATE_TOKEN"],
gitlab_build_badge_id=os.environ["BUILD_BADGE_ID"]
)
build_badge_updater.update()

View File

@@ -3,9 +3,11 @@ FROM debian:${TARGET}-slim
ARG UID
ARG GID
ARG IMAGE
ENV UID 1000
ENV GID 1000
ENV PYTHONUNBUFFERED 1
ENV IMAGE ${IMAGE}
RUN apt-get update && \
apt-get install \
@@ -21,7 +23,8 @@ RUN apt-get update && \
/var/log/fsck/*.log \
/var/log/apt/*.log \
/var/cache/debconf/*.dat-old \
/var/lib/apt/lists/*
/var/lib/apt/lists/* && \
groupmod -g 90 users
COPY --chmod=755 entrypoint-docker.sh /entrypoint.sh
COPY issue /etc/issue
@@ -39,10 +42,10 @@ ARG CREATED
ARG REVISION
ARG VERSION
LABEL org.opencontainers.image.created=${CREATED}
LABEL org.opencontainers.image.authors="flow.gunso@gmail.com"
LABEL org.opencontainers.image.url="https://hub.docker.com/r/flowgunso/seafile-client"
LABEL org.opencontainers.image.documentation="https://gitlab.com/florian.anceau/docker-seafile-client"
LABEL org.opencontainers.image.source="https://gitlab.com/florian.anceau/docker-seafile-client"
LABEL org.opencontainers.image.authors="florian.anceau@gmail.com"
LABEL org.opencontainers.image.url="https://hub.docker.com/r/flrnnc/seafile-client"
LABEL org.opencontainers.image.documentation="https://gitlab.com/flrnnc-oss/docker-seafile-client"
LABEL org.opencontainers.image.source="https://gitlab.com/flrnnc-oss/docker-seafile-client"
LABEL org.opencontainers.image.version=${VERSION}
LABEL org.opencontainers.image.revision=${REVISION}
LABEL org.opencontainers.image.licenses="GPL-3.0"

View File

@@ -1,7 +1,7 @@
#!/bin/bash
# Docker Seafile client, help you mount a Seafile library as a volume.
# Copyright (C) 2019-2020, flow.gunso@gmail.com
# Copyright (C) 2019-2024, florian.anceau@gmail.com
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -23,7 +23,20 @@ set -e
groupmod -g $GID seafile &> /dev/null
usermod -u $UID -g $GID seafile &> /dev/null
if [ "$IMAGE" == "flowgunso" ]; then
echo
echo -e "┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓"
echo -e "┃ \e[1mPlease use \e[4mflrnnc/seafile-client\e[24m instead of \e[4mflowgunso/seafile-client\e[24m which will be deprecated...\e[0m ┃"
echo -e "┃ See the information notices at: ┃"
echo -e "┃ \thttps://forum.seafile.com/t/docker-client-to-sync-files-with-containers/8573 ┃"
echo -e "┃ \thttps://gitlab.com/flrnnc-oss/docker-seafile-client ┃"
echo -e "┃ \thttps://hub.docker.com/r/flowgunso/seafile-client ┃"
echo -e "┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛"
echo
fi
sudo \
-HE \
-u seafile \
-- "$@"
-- "$@"

View File

@@ -110,7 +110,7 @@ class Client:
if variable.startswith("SEAF_LIBRARY"):
# Get the variable name.
name = variable.split("_")[2]
name = variable.split("_")[2].lower()
# Read the password as a secret.
if "_PASSWORD" in variable:
@@ -150,7 +150,7 @@ class Client:
def configure(self):
command = self.binary + ["config"]
if self.skip_ssl_cert:
subprocess.run(command +["-k", "disable_verify_certificate", "-v", self.skip_ssl_cert])
subprocess.run(command +["-k", "disable_verify_certificate", "-v", str(self.skip_ssl_cert)])
if self.download_limit:
subprocess.run(command +["-k", "download_limit", "-v", self.download_limit])
if self.upload_limit:

View File

@@ -1,5 +1,5 @@
ARG TARGET=unstable
FROM seafile-client:${TARGET}
FROM seafile-client:${TARGET}-flrnnc
COPY --chmod=755 test_binaries.sh /test.sh

View File

@@ -1,7 +1,7 @@
#!/bin/bash
# Docker Seafile client, help you mount a Seafile library as a volume.
# Copyright (C) 2019-2020, flow.gunso@gmail.com
# Copyright (C) 2019-2024, florian.anceau@gmail.com
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by

View File

@@ -1,3 +1,5 @@
name: mock-docker-seafile-client
services:
mariadb:
image: mariadb:10.11
@@ -31,7 +33,7 @@ services:
- memcached
client:
image: seafile-client:unstable
image: seafile-client:${TARGET}-flowgunso
volumes:
#- library:/library
- data:/seafile
@@ -40,8 +42,10 @@ services:
SEAF_SERVER_URL: "http://seafile"
SEAF_USERNAME: "seafile@localhost"
SEAF_PASSWORD: "password"
SEAF_LIBRARY_UUID: "1b7d4e92-6753-4c4a-85b0-42566eab42c8"
SEAF_LIBRARY: "1b7d4e92-6753-4c4a-85b0-42566eab42c8"
DEBUG: 1
UID: 1000
GID: 100
depends_on:
- seafile