-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(project-operator): add filebrowser custom image
- Loading branch information
1 parent
3c2fd71
commit c9637eb
Showing
9 changed files
with
280 additions
and
428 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
ARG BASE_S3FUSE_IMAGE=efrecon/s3fs:1.94 | ||
ARG BASE_FILEBROWSER_IMAGE=filebrowser/filebrowser:v2 | ||
|
||
FROM efrecon/s3fs:${BASE_S3FUSE_IMAGE} AS s3fs | ||
FROM filebrowser/filebrowser:${BASE_FILEBROWSER_IMAGE} | ||
|
||
COPY --from=s3fs /usr/bin/s3fs /usr/bin/s3fs | ||
COPY --from=s3fs /usr/local/bin/*.sh /usr/local/bin/ | ||
COPY --from=s3fs /etc/fuse.conf /etc/fuse.conf | ||
|
||
# s3fs dependencies | ||
RUN apk add --no-cache \ | ||
fuse \ | ||
libxml2 \ | ||
libcurl \ | ||
libgcc \ | ||
libstdc++ \ | ||
tini && \ | ||
mkdir -p /srv && \ | ||
# Create non-root user | ||
addgroup -g 1000 filebrowser && \ | ||
adduser -D -u 1000 -G filebrowser filebrowser && \ | ||
chown -R filebrowser:filebrowser /srv | ||
|
||
COPY entrypoint.sh /entrypoint.sh | ||
RUN chmod +x /entrypoint.sh | ||
|
||
VOLUME ["/srv"] | ||
EXPOSE 9696 | ||
|
||
ENTRYPOINT ["tini", "-g", "--", "/entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
# Filebrowser with S3Fuse | ||
|
||
Docker image combining `Filebrowser` web interface with `S3Fuse` mount capabilities for S3-compatible storage, providing a seamless way to browse and manage files both locally and in S3 buckets. | ||
|
||
## Security Features | ||
|
||
* Non-root user (`filebrowser`) execution with configurable UID/GID (default `1000:1000`) | ||
* Proper permission handling | ||
* Tini as init system for proper process management | ||
|
||
## Configuration | ||
|
||
### Build Arguments | ||
|
||
| Variable | Description | Default | | ||
|--------------------------|----------------------------|---------| | ||
| `BASE_FILEBROWSER_IMAGE` | Filebrowser base image tag | `v2` | | ||
| `BASE_S3FUSE_IMAGE` | S3Fuse base image tag | `1.94` | | ||
|
||
### Environment Variables | ||
|
||
| Variable | Description | Required | | ||
|----------------------------|---------------------------------|----------| | ||
| `AWS_S3_ACCESS_KEY_ID` | AWS/S3 access key | `Yes` | | ||
| `AWS_S3_BUCKET` | S3 bucket name to mount | `Yes` | | ||
| `AWS_S3_MOUNT` | Mount point inside container | `No` | | ||
| `AWS_S3_SECRET_ACCESS_KEY` | AWS/S3 secret key | `Yes` | | ||
| `AWS_S3_URL` | S3-compatible endpoint URL | `Yes` | | ||
| `S3FS_ARGS` | Additional S3Fuse mount options | `No` | | ||
|
||
## Storage | ||
|
||
* Web interface files: `/srv` | ||
* S3 bucket mount: configurable via `AWS_S3_MOUNT` (default: `/srv`) | ||
* Filebrowser database: `/database.db` | ||
|
||
## Local Deployment | ||
|
||
Basic usage: | ||
|
||
```bash | ||
docker run -p 9696:9696 \ | ||
-e "AWS_S3_ACCESS_KEY_ID=user" \ | ||
-e "AWS_S3_BUCKET=my-bucket" \ | ||
-e "AWS_S3_SECRET_ACCESS_KEY=pass" \ | ||
-e "FB_ADDRESS="0.0.0.0" \ | ||
-e "FB_DATABASE=/database.db \ | ||
-e "FB_LOG=stdout \ | ||
-e "FB_ROOT=/srv \ | ||
--device /dev/fuse \ | ||
--cap-add SYS_ADMIN \ | ||
--security-opt apparmor:unconfined \ | ||
konstellation/kdl-filebrowser:latest | ||
``` | ||
|
||
With custom configuration: | ||
|
||
```bash | ||
docker run -p 9696:9696 \ | ||
--user 1000:1000 \ | ||
-e "AWS_S3_ACCESS_KEY_ID=user" \ | ||
-e "AWS_S3_BUCKET=my-bucket" \ | ||
-e "AWS_S3_MOUNT=/srv/data" \ | ||
-e "AWS_S3_SECRET_ACCESS_KEY=pass" \ | ||
-e "AWS_S3_URL=http://minio:9000" \ | ||
-e "FB_ADDRESS="0.0.0.0" \ | ||
-e "FB_DATABASE=/database.db \ | ||
-e "FB_LOG=stdout \ | ||
-e "FB_ROOT=/srv \ | ||
-e "S3FS_ARGS=allow_other,use_path_request_style" \ | ||
-v /path/to/config:/srv \ | ||
--device /dev/fuse \ | ||
--cap-add SYS_ADMIN \ | ||
--security-opt apparmor:unconfined \ | ||
konstellation/kdl-filebrowser:latest | ||
``` | ||
|
||
Access the web interface at <http://localhost:9696> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
{ | ||
"name": "filebrowser", | ||
"version": "1.0.0", | ||
"private": true, | ||
"release": { | ||
"tagFormat": "filebrowser-v${version}", | ||
"extends": "semantic-release-monorepo", | ||
"branches": [ | ||
"main", | ||
{ | ||
"channel": "default", | ||
"name": "release/*", | ||
"prerelease": "rc" | ||
}, | ||
{ | ||
"channel": "default", | ||
"name": "hotfix/+([0-9])?(.{+([0-9]),x}).x", | ||
"prerelease": false, | ||
"range": "${name.replace(/^hotfix\\//g, '')}" | ||
} | ||
], | ||
"plugins": [ | ||
"@semantic-release/commit-analyzer", | ||
[ | ||
"@semantic-release/git", | ||
{ | ||
"assets": [ | ||
"**/package.json" | ||
], | ||
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}" | ||
} | ||
], | ||
[ | ||
"@semantic-release/github", | ||
{ | ||
"failComment": false, | ||
"published": true, | ||
"successComment": false | ||
} | ||
], | ||
[ | ||
"@semantic-release/release-notes-generator", | ||
{ | ||
"preset": "conventionalcommits", | ||
"presetConfig": { | ||
"types": [ | ||
{ | ||
"type": "chore", | ||
"section": "Miscellaneous Chores" | ||
}, | ||
{ | ||
"type": "ci", | ||
"section": "Continuous Integration", | ||
"hidden": true | ||
}, | ||
{ | ||
"type": "docs", | ||
"section": "Documentation", | ||
"hidden": true | ||
}, | ||
{ | ||
"type": "feat", | ||
"section": "Features" | ||
}, | ||
{ | ||
"type": "fix", | ||
"section": "Bug Fixes" | ||
}, | ||
{ | ||
"type": "refactor", | ||
"section": "Code Refactoring" | ||
} | ||
] | ||
} | ||
} | ||
] | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.