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

Feature/filebrowser #71

Merged
merged 4 commits into from
Feb 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions .github/workflows/serve-filemanager.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Streamlit example workflow

on:
push:
paths:
- "serve-filemanager/**"
workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
required: true
default: 'warning'
type: choice
options:
- info
- warning
- debug
tags:
description: 'Manual run'
required: false
type: boolean


jobs:
push:
if: |
github.ref == 'refs/heads/main' &&
github.repository == 'scilifelabdatacentre/serve-images'
runs-on: ubuntu-latest
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true
permissions:
contents: read
packages: write

steps:
- name: 'Checkout github action'
uses: actions/checkout@main

- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: ghcr.io/scilifelabdatacentre/serve-filemanager
tags: |
type=raw,value={{date 'YYMMDD-HHmm' tz='Europe/Stockholm'}}

- name: 'Login to GHCR'
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{github.actor}}
password: ${{secrets.GITHUB_TOKEN}}

- name: Publish image to GHCR
uses: docker/build-push-action@v3
with:
file: ./examples/streamlit/Dockerfile
context: ./examples/streamlit
push: true
build-args: version=${{ github.ref_name }}
tags: |
${{ steps.meta.outputs.tags }}
ghcr.io/scilifelabdatacentre/serve-filemanager:latest
labels: ${{ steps.meta.outputs.labels }}
17 changes: 17 additions & 0 deletions serve-filemanager/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM filebrowser/filebrowser

ARG USER=serve
ARG HOME=/home/$USER

COPY filebrowser.json /.filebrowser.json

COPY startup.sh /usr/local/bin/startup.sh
RUN apk update \
&& adduser -D -u 1000 -g 1000 -h $HOME $USER \
&& chmod +x /usr/local/bin/startup.sh \
&& rm -rf /var/lib/apt/lists/*

COPY branding/ $HOME/branding

USER $USER
ENTRYPOINT [ "/usr/local/bin/startup.sh" ]
14 changes: 14 additions & 0 deletions serve-filemanager/branding/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
:root{
--serve-lime: #a7c947;
--bs-body-color-rgb: rgb(33, 37, 41);
}

.button {
background: var(--serve-lime);
color: black
}

.button:hover {
background-color: var(--serve-lime);
box-shadow: 0 0.5rem 1rem rgba(var(--bs-body-color-rgb), .15) !important;
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions serve-filemanager/branding/img/icons/browserconfig.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<browserconfig>
<msapplication>
<tile>
<square150x150logo src="/mstile-150x150.png"/>
<TileColor>#da532c</TileColor>
</tile>
</msapplication>
</browserconfig>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added serve-filemanager/branding/img/icons/favicon.ico
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 29 additions & 0 deletions serve-filemanager/branding/img/icons/safari-pinned-tab.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions serve-filemanager/branding/img/icons/site.webmanifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "",
"short_name": "",
"icons": [
{
"src": "/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
],
"theme_color": "#ffffff",
"background_color": "#ffffff",
"display": "standalone"
}
24 changes: 24 additions & 0 deletions serve-filemanager/branding/img/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions serve-filemanager/filebrowser.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"port": 8080,
"baseURL": "",
"address": "",
"log": "stdout",
"database": "/home/serve/database.db",
"root": "/srv"
}
7 changes: 7 additions & 0 deletions serve-filemanager/startup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/ash

/filebrowser config init
/filebrowser users add $FB_USERNAME $FB_PASSWORD
/filebrowser config set --branding.name "Serve File Manager" --branding.files "/home/serve/branding" --branding.disableExternal
/filebrowser config set --auth.method=noauth
/filebrowser
Loading