Skip to content

Commit ba7aa3b

Browse files
committed
beclab first commit
0 parents  commit ba7aa3b

File tree

166 files changed

+22245
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

166 files changed

+22245
-0
lines changed

.dockerignore

Whitespace-only changes.

.github/workflows/update-gateway.yaml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Publish to Dockerhub ( appdata-gateway )
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
tags:
7+
description: 'Release Tags'
8+
# push:
9+
# branches:
10+
# - "main"
11+
# - "dev_wrx"
12+
13+
jobs:
14+
update_dockerhub:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Check out the repo
18+
uses: actions/checkout@v3
19+
20+
- name: Log in to Docker Hub
21+
uses: docker/login-action@v2
22+
with:
23+
username: ${{ secrets.DOCKERHUB_USERNAME }}
24+
password: ${{ secrets.DOCKERHUB_PASS }}
25+
26+
- name: get latest tag
27+
uses: "WyriHaximus/github-action-get-previous-tag@v1"
28+
id: get-latest-tag
29+
with:
30+
fallback: latest
31+
32+
- name: Build and push Docker image
33+
uses: docker/build-push-action@v3
34+
with:
35+
push: true
36+
tags: beclab/appdata-gateway:${{ github.event.inputs.tags }}
37+
# tags: beclab/appdata-gateway:${{ steps.get-latest-tag.outputs.tag }}
38+
file: Dockerfile.gateway
39+

.github/workflows/update-server.yml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Update Server
2+
3+
on:
4+
workflow_dispatch:
5+
6+
push:
7+
branches:
8+
- "main"
9+
- "dev_wrx"
10+
tags:
11+
- 'v*'
12+
13+
jobs:
14+
update_server:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Check out the repo
18+
uses: actions/checkout@v3
19+
with:
20+
submodules: recursive
21+
- uses: actions/setup-go@v2
22+
with:
23+
go-version: 1.18.3
24+
- name: Login to GitHub Container Registry
25+
uses: docker/login-action@v2
26+
with:
27+
username: ${{ secrets.DOCKERHUB_USERNAME }}
28+
password: ${{ secrets.DOCKERHUB_PASS }}
29+
- name: get latest tag
30+
uses: "WyriHaximus/github-action-get-previous-tag@v1"
31+
id: get-latest-tag
32+
with:
33+
fallback: latest
34+
- name: Build
35+
run: cd packages/backend/;go mod tidy;export CGO_ENABLED=0;make build-backend;ls
36+
- name: Build and push
37+
uses: docker/build-push-action@v2
38+
with:
39+
context: .
40+
file: Dockerfile
41+
push: true
42+
tags: beclab/files-server:${{ steps.get-latest-tag.outputs.tag }}
43+

.gitignore

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
*.db
2+
*.bak
3+
_old
4+
rice-box.go
5+
.idea/
6+
/filebrowser
7+
/filebrowser.exe
8+
packages/backend/filebrowser
9+
packages/backend/filebrowser.exe
10+
/dist
11+
12+
/Documents
13+
/Download
14+
/Movies
15+
/Network
16+
/Pictures
17+
18+
.DS_Store
19+
node_modules
20+
21+
# local env files
22+
.env.local
23+
.env.*.local
24+
25+
# Log files
26+
npm-debug.log*
27+
yarn-debug.log*
28+
yarn-error.log*
29+
30+
# Editor directories and files
31+
.idea
32+
.vscode
33+
*.suo
34+
*.ntvs*
35+
*.njsproj
36+
*.sln
37+
*.sw*
38+
bin/
39+
build/

.versionrc

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"types": [
3+
{ "type": "feat", "section": "Features" },
4+
{ "type": "fix", "section": "Bug Fixes" },
5+
{ "type": "perf", "section": "Performance improvements" },
6+
{ "type": "revert", "section": "Reverts" },
7+
{ "type": "refactor", "section": "Refactorings" },
8+
{ "type": "build", "section": "Build" },
9+
{ "type": "ci", "hidden": true },
10+
{ "type": "test", "hidden": true },
11+
{ "type": "chore", "hidden": true },
12+
{ "type": "docs", "hidden": true }
13+
]
14+
}

Dockerfile

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#FROM alpine:latest
2+
#RUN apk --update add ca-certificates \
3+
# mailcap \
4+
# curl
5+
6+
FROM ubuntu:22.04
7+
RUN apt-get update && \
8+
apt-get install -y poppler-utils wv unrtf tidy && \
9+
apt-get install -y inotify-tools && \
10+
apt-get install -y ca-certificates mailcap curl
11+
12+
HEALTHCHECK --start-period=2s --interval=5s --timeout=3s \
13+
CMD curl -f http://localhost/health || exit 1
14+
15+
VOLUME /srv
16+
EXPOSE 8110
17+
18+
COPY packages/backend/docker_config.json /.filebrowser.json
19+
COPY packages/backend/filebrowser /filebrowser
20+
21+
ENTRYPOINT [ "/filebrowser" ]

Dockerfile-frontend

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
FROM nginx:stable-alpine
2+
3+
RUN sed -i '1idaemon off;' /etc/nginx/nginx.conf
4+
5+
COPY nginx.conf /etc/nginx/conf.d/default.conf
6+
7+
# adapt the `dist/` folder to the output directory your build tool uses (such as `dist/`, `build/` or `www/`).
8+
COPY packages/frontend/dist/spa/ /app
9+
10+
EXPOSE 80
11+
12+
CMD ["nginx"]

Dockerfile.gateway

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Copyright 2023 bytetrade
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
FROM golang:1.20 as builder
16+
17+
WORKDIR /workspace
18+
COPY packages/gateway/go.mod packages/gateway/go.sum ./
19+
RUN \
20+
echo ">> Downloading go modules..." && \
21+
go mod download
22+
23+
COPY packages/gateway/ ./
24+
25+
RUN CGO_ENABLED=0 go build -o appdata-gateway cmd/main.go
26+
27+
# Use distroless as minimal base image to package the manager binary
28+
# Refer to https://github.com/GoogleContainerTools/distroless for more details
29+
# FROM gcr.io/distroless/base:nonroot
30+
FROM gcr.io/distroless/base:debug
31+
WORKDIR /
32+
COPY --from=builder /workspace/appdata-gateway .
33+
34+
EXPOSE 8080
35+
36+
ENTRYPOINT ["/appdata-gateway"]

Dockerfile.s6

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
FROM ghcr.io/linuxserver/baseimage-alpine:3.14
2+
3+
RUN apk --update add ca-certificates \
4+
mailcap \
5+
curl
6+
7+
HEALTHCHECK --start-period=2s --interval=5s --timeout=3s \
8+
CMD curl -f http://localhost/health || exit 1
9+
10+
# copy local files
11+
COPY docker/root/ /
12+
COPY filebrowser /usr/bin/filebrowser
13+
14+
# ports and volumes
15+
VOLUME /srv /config /database
16+
EXPOSE 80

Dockerfile.s6.aarch64

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.14
2+
3+
RUN apk --update add ca-certificates \
4+
mailcap \
5+
curl
6+
7+
HEALTHCHECK --start-period=2s --interval=5s --timeout=3s \
8+
CMD curl -f http://localhost/health || exit 1
9+
10+
# copy local files
11+
COPY docker/root/ /
12+
COPY filebrowser /usr/bin/filebrowser
13+
14+
# ports and volumes
15+
VOLUME /srv /config /database
16+
EXPOSE 80

Dockerfile.s6.armhf

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
FROM ghcr.io/linuxserver/baseimage-alpine:arm32v7-3.14
2+
3+
RUN apk --update add ca-certificates \
4+
mailcap \
5+
curl
6+
7+
HEALTHCHECK --start-period=2s --interval=5s --timeout=3s \
8+
CMD curl -f http://localhost/health || exit 1
9+
10+
# copy local files
11+
COPY docker/root/ /
12+
COPY filebrowser /usr/bin/filebrowser
13+
14+
# ports and volumes
15+
VOLUME /srv /config /database
16+
EXPOSE 80

LICENSE.md

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Terminus License
2+
3+
## Acceptance
4+
5+
By using the software, you agree to all of the terms and conditions below.
6+
7+
## Copyright License
8+
9+
The licensor grants you a non-exclusive, royalty-free, worldwide, non-sublicensable, non-transferable license to use, copy, distribute, make available, and prepare derivative works of the software, in each case subject to the limitations below.
10+
11+
## Limitations
12+
13+
You may use or modify the software only for your own internal business purposes or for non-commercial or personal use. You may distribute the software or provide it to others only if you do so free of charge for non-commercial purposes. You may not alter, remove, or obscure any licensing, copyright, or other notices of the licensor in the software. Any use of the licensor’s trademarks is subject to applicable law.
14+
15+
## Patents
16+
17+
The licensor grants you a license, under any patent claims the licensor can license, or becomes able to license, to make, have made, use, sell, offer for sale, import and have imported the software, in each case subject to the limitations and conditions in this license. This license does not cover any patent claims that you cause to be infringed by modifications or additions to the software. If you or your company make any written claim that the software infringes or contributes to infringement of any patent, your patent license for the software granted under these terms ends immediately. If your company makes such a claim, your patent license ends immediately for work on behalf of your company.
18+
19+
## Notices
20+
21+
You must ensure that anyone who gets a copy of any part of the software from you also gets a copy of these terms. If you modify the software, you must include in any modified copies of the software a prominent notice stating that you have modified the software.
22+
23+
## No Other Rights
24+
25+
These terms do not imply any licenses other than those expressly granted in these terms.
26+
27+
## Termination
28+
29+
If you use the software in violation of these terms, such use is not licensed, and your license will automatically terminate. If the licensor provides you with a notice of your violation, and you cease all violation of this license no later than 30 days after you receive that notice, your license will be reinstated retroactively. However, if you violate these terms after such reinstatement, any additional violation of these terms will cause your license to terminate automatically and permanently.
30+
31+
## No Liability
32+
33+
As far as the law allows, the software comes as is, without any warranty or condition, and the licensor will not be liable to you for any damages arising out of these terms or the use or nature of the software, under any kind of legal claim.
34+
35+
## Definitions
36+
37+
The “licensor” is the entity offering these terms.
38+
39+
The “software” is the software the licensor makes available under these terms, including any portion of it.
40+
41+
“You” refers to the individual or entity agreeing to these terms.
42+
43+
“Your company” is any legal entity, sole proprietorship, or other kind of organization that you work for, plus all organizations that have control over, are under the control of, or are under common control with that organization. Control means ownership of substantially all the assets of an entity, or the power to direct its management and policies by vote, contract, or otherwise. Control can be direct or indirect.
44+
45+
“Your license” is the license granted to you for the software under these terms.
46+
47+
“Use” means anything you do with the software requiring your license.
48+
49+
“Trademark” means trademarks, service marks, and similar rights.

README.md

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# files
2+
3+
A file manager for Terminus
4+
5+
## Installation
6+
7+
- Install node in you system, You can check if you have node installed by running this code in your terminal
8+
```bash
9+
node -v
10+
```
11+
12+
if it's not there, you can install from this site <a href="https://nodejs.org/en/" target="_blank"> Node JS</a>
13+
14+
- Clone the repo
15+
```bash
16+
git clone https://github.com/beclab/files.git
17+
```
18+
19+
- Navigate to the `files/` folder
20+
Then start the server
21+
```bash
22+
./filebrowser --noauth
23+
```
24+
```bash
25+
# Output:
26+
Listening on 127.0.0.1:8110
27+
```
28+
29+
- Navigate to the `frontend/` folder
30+
```bash
31+
cd packages/frontend
32+
```
33+
Then install all the dependencies
34+
```bash
35+
npm i
36+
```
37+
Then start the server
38+
```bash
39+
quasar dev
40+
```
41+
```bash
42+
#Output:
43+
Opening default browser at http://localhost:8100/
44+
```

0 commit comments

Comments
 (0)