Compare commits
64 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7103691048 | ||
|
|
85821736c0 | ||
|
|
e474ade92b | ||
|
|
ad30a3a1f3 | ||
|
|
bb1d1d3801 | ||
|
|
c3a2f1d604 | ||
|
|
154947ef83 | ||
|
|
bc9096fad3 | ||
|
|
3d28d8cb8e | ||
|
|
9b85951cfc | ||
|
|
d125c6736b | ||
|
|
f8d4d9cb17 | ||
|
|
08cb4b0fce | ||
|
|
95d41a9518 | ||
|
|
6bdc5ccfb3 | ||
|
|
2046bbde72 | ||
|
|
c1718ff4c5 | ||
|
|
1db6713019 | ||
|
|
c89e1d18de | ||
|
|
d401028eb6 | ||
|
|
f6ac9cc63f | ||
|
|
a22edfca00 | ||
|
|
55706b2f8b | ||
|
|
09e2b9a107 | ||
|
|
9ee41b14d6 | ||
|
|
8158333d93 | ||
|
|
e843adcf0b | ||
|
|
f182e378e3 | ||
|
|
27d7126767 | ||
|
|
a62bb38773 | ||
|
|
603f048722 | ||
|
|
442843239c | ||
|
|
b63615a4b8 | ||
|
|
9d78ee8b01 | ||
|
|
9b5d2718ab | ||
|
|
a38d8e3934 | ||
|
|
db3f4c01ea | ||
|
|
c5d481c5cc | ||
|
|
a04567d3ba | ||
|
|
03c3f6d7f9 | ||
|
|
95147f5828 | ||
|
|
dd9d7c09a2 | ||
|
|
a19ff20768 | ||
|
|
b03232775e | ||
|
|
ef09231454 | ||
|
|
6b06fb2532 | ||
|
|
2512330dee | ||
|
|
642cab42cc | ||
|
|
c03e601bc3 | ||
|
|
0d0e728c79 | ||
|
|
530055df08 | ||
|
|
5d841d6624 | ||
|
|
211568ff4c | ||
|
|
44bedb9be0 | ||
|
|
c8fff90634 | ||
|
|
a6a28a6356 | ||
|
|
14ed4fdb92 | ||
|
|
65f7dc448d | ||
|
|
fb31a14873 | ||
|
|
c741ae2212 | ||
|
|
e118d650a3 | ||
|
|
c260601ef6 | ||
|
|
462566a31b | ||
|
|
0a92002919 |
38
.github/workflows/PublishDocker.yml
vendored
Normal file
38
.github/workflows/PublishDocker.yml
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
name: PublishDocker
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
tags:
|
||||
- '**'
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Docker meta
|
||||
id: meta
|
||||
uses: docker/metadata-action@v3
|
||||
with:
|
||||
images: |
|
||||
${{ secrets.DOCKERHUB_USERNAME }}/tinyfilemanager
|
||||
tags: |
|
||||
type=ref,event=branch
|
||||
type=ref,event=pr
|
||||
type=semver,pattern={{version}}
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
- name: Build and push
|
||||
id: docker_build
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
32
Dockerfile
Normal file
32
Dockerfile
Normal file
@@ -0,0 +1,32 @@
|
||||
# how to build?
|
||||
# docker login
|
||||
## .....input your docker id and password
|
||||
#docker build . -t tinyfilemanager/tinyfilemanager:master
|
||||
#docker push tinyfilemanager/tinyfilemanager:master
|
||||
|
||||
# how to use?
|
||||
# docker run -d -v /absolute/path:/var/www/html/data -p 80:80 --restart=always --name tinyfilemanager tinyfilemanager/tinyfilemanager:master
|
||||
|
||||
FROM php:7.4-cli-alpine
|
||||
|
||||
# if run in China
|
||||
# RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
|
||||
|
||||
RUN apk add \
|
||||
libzip-dev \
|
||||
oniguruma-dev
|
||||
|
||||
RUN docker-php-ext-install \
|
||||
zip \
|
||||
mbstring \
|
||||
iconv \
|
||||
fileinfo
|
||||
|
||||
WORKDIR /var/www/html
|
||||
|
||||
COPY tinyfilemanager.php index.php
|
||||
COPY config-sample.php config.php
|
||||
RUN sed -i "s/\$root_path =.*;/\$root_path = \$_SERVER['DOCUMENT_ROOT'].'\/data';/g" config.php && \
|
||||
sed -i "s/\$root_url = '';/\$root_url = 'data\/';/g" config.php
|
||||
|
||||
CMD ["sh", "-c", "php -S 0.0.0.0:80"]
|
||||
71
README.md
71
README.md
@@ -1,22 +1,21 @@
|
||||
# Tiny File Manager
|
||||
|
||||
|
||||
[](https://tinyfilemanager.github.io/demo/)
|
||||
[](https://github.com/prasathmani/tinyfilemanager/wiki)
|
||||
[](https://github.com/prasathmani/tinyfilemanager/releases)
|
||||
[](https://github.com/prasathmani/tinyfilemanager/blob/master/LICENSE)
|
||||
[](https://github.com/prasathmani/tinyfilemanager/blob/master/LICENSE)
|
||||
[](https://www.paypal.me/prasathmani)
|
||||
|
||||
> TinyFileManager is web based file manager and it is a simple, fast and small file manager with a single file, multi-language ready web application for storing, uploading, editing and managing files and folders online via web browser. The Application runs on PHP 5.5+, It allows the creation of multiple users and each user can have its own directory and a build-in support for managing text files with cloud9 IDE and it supports syntax highlighting for over 150+ languages and over 35+ themes.
|
||||
|
||||
## Demo
|
||||
[Demo](https://tinyfilemanager.github.io/demo/)
|
||||
|
||||
Login Details : admin/admin@123 | user/12345
|
||||
[Demo](https://tinyfilemanager.github.io/demo/)
|
||||
|
||||
|
||||
## Documentation
|
||||
Tinyfilemanager is highly documented on the [wiki pages](https://github.com/prasathmani/tinyfilemanager/wiki).
|
||||
|
||||
Tinyfilemanager is highly documented on the [wiki pages](https://github.com/prasathmani/tinyfilemanager/wiki).
|
||||
|
||||
[](screenshot.gif)
|
||||
|
||||
@@ -38,6 +37,7 @@ Default username/password: **admin/admin@123** and **user/12345**.
|
||||
|
||||
To enable/disable authentication set `$use_auth` to true or false.
|
||||
|
||||
:information_source: Rename the `config-sample.php` file into `config.php` to use configuration, it is an additional configuration file, Feel free to remove completely this file and configure "tinyfilemanager.php" as a single file application.
|
||||
|
||||
### :loudspeaker: Features
|
||||
|
||||
@@ -57,6 +57,67 @@ To enable/disable authentication set `$use_auth` to true or false.
|
||||
- :globe_with_meridians: Multi-language(20+) support and for translations `translation.json` is file required
|
||||
- :bangbang: lots more...
|
||||
|
||||
## Deploy by Docker
|
||||
|
||||
Make sure you have **already installed docker**, [Install reference](https://docs.docker.com/engine/install/)
|
||||
|
||||
> **Notice:** Your need an absolute path, and it will be served by tinyfilemanager.
|
||||
>
|
||||
> If you want to serve this project at **raspberry pi or another special platform**, you can download project and **build image by yourself**.
|
||||
|
||||
You can execute this following commands:
|
||||
|
||||
```shell
|
||||
$ docker run -d -v /absolute/path:/var/www/html/data -p 80:80 --restart=always --name tinyfilemanager tinyfilemanager/tinyfilemanager:master
|
||||
$ docker ps
|
||||
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
|
||||
648dfba9c0ff tinyfilemanager/tinyfilemanager:master "docker-php-entrypoi…" 4 minutes ago Up 4 minutes 0.0.0.0:80->80/tcp, :::80->80/tcp tinyfilemanager
|
||||
```
|
||||
Access `http://127.0.0.1/` and enter default username and password, then enjoy it.
|
||||
|
||||
DockerHub: [https://hub.docker.com/r/tinyfilemanager/tinyfilemanager](https://hub.docker.com/r/tinyfilemanager/tinyfilemanager)
|
||||
|
||||
#### How to change config within docker
|
||||
|
||||
**Important!!!** First, you can copy `config-sample.php` to `config.php`, and must modify this following config
|
||||
|
||||
Origin:
|
||||
|
||||
```php
|
||||
// Root path for file manager
|
||||
// use absolute path of directory i.e: '/var/www/folder' or $_SERVER['DOCUMENT_ROOT'].'/folder'
|
||||
$root_path = $_SERVER['DOCUMENT_ROOT'];
|
||||
|
||||
// Root url for links in file manager.Relative to $http_host. Variants: '', 'path/to/subfolder'
|
||||
// Will not working if $root_path will be outside of server document root
|
||||
$root_url = '';
|
||||
```
|
||||
|
||||
Modified:
|
||||
|
||||
```php
|
||||
// Root path for file manager
|
||||
// use absolute path of directory i.e: '/var/www/folder' or $_SERVER['DOCUMENT_ROOT'].'/folder'
|
||||
$root_path = $_SERVER['DOCUMENT_ROOT'].'/data';
|
||||
|
||||
// Root url for links in file manager.Relative to $http_host. Variants: '', 'path/to/subfolder'
|
||||
// Will not working if $root_path will be outside of server document root
|
||||
$root_url = 'data/';
|
||||
```
|
||||
|
||||
Then, change another config what you want, and add a new volume `-v /absolute/path/config.php:/var/www/html/config.php` in `docker run` command, like this:
|
||||
|
||||
```shell
|
||||
$ docker run -d -v /absolute/path:/var/www/html/data -v /absolute/path/config.php:/var/www/html/config.php -p 80:80 --restart=always --name tinyfilemanager tinyfilemanager/tinyfilemanager:master
|
||||
```
|
||||
|
||||
#### Stop running
|
||||
|
||||
If you want to stop a running docker service, or you want to restart a service, you should stop it first, or you got `docker: Error response from daemon: Conflict. The container name "/tinyfilemanager" is already in use by container ...` problem. You can execute this command:
|
||||
|
||||
```shell
|
||||
$ docker rm -f tinyfilemanager
|
||||
```
|
||||
|
||||
### <a name=license></a>License, Credit
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
/*
|
||||
#################################################################################################################
|
||||
This is an OPTIONAL configuration file.
|
||||
This is an OPTIONAL configuration file. rename this file into config.php to use this configuration
|
||||
The role of this file is to make updating of "tinyfilemanager.php" easier.
|
||||
So you can:
|
||||
-Feel free to remove completely this file and configure "tinyfilemanager.php" as a single file application.
|
||||
@@ -11,12 +11,6 @@ or
|
||||
#################################################################################################################
|
||||
*/
|
||||
|
||||
// Auth with login/password
|
||||
// set true/false to enable/disable it
|
||||
// Is independent from IP white- and blacklisting
|
||||
$use_auth = true;
|
||||
|
||||
|
||||
// Auth with login/password
|
||||
// set true/false to enable/disable it
|
||||
// Is independent from IP white- and blacklisting
|
||||
@@ -30,10 +24,6 @@ $auth_users = array(
|
||||
'user' => '$2y$10$Fg6Dz8oH9fPoZ2jJan5tZuv6Z4Kp7avtQ9bDfrdRntXtPeiMAZyGO' //12345
|
||||
);
|
||||
|
||||
//set application theme
|
||||
//options - 'light' and 'dark'
|
||||
$theme = 'light';
|
||||
|
||||
// Readonly users
|
||||
// e.g. array('users', 'guest', ...)
|
||||
$readonly_users = array(
|
||||
@@ -73,8 +63,8 @@ $directories_users = array();
|
||||
$iconv_input_encoding = 'UTF-8';
|
||||
|
||||
// date() format for file modification date
|
||||
// Doc - https://www.php.net/manual/en/function.date.php
|
||||
$datetime_format = 'd.m.y H:i';
|
||||
// Doc - https://www.php.net/manual/en/datetime.format.php
|
||||
$datetime_format = 'd.m.y H:i:s';
|
||||
|
||||
// Allowed file extensions for create and rename files
|
||||
// e.g. 'txt,html,css,js'
|
||||
@@ -87,11 +77,11 @@ $allowed_upload_extensions = '';
|
||||
// Favicon path. This can be either a full url to an .PNG image, or a path based on the document root.
|
||||
// full path, e.g http://example.com/favicon.png
|
||||
// local path, e.g images/icons/favicon.png
|
||||
$favicon_path = '?img=favicon';
|
||||
$favicon_path = '';
|
||||
|
||||
// Files and folders to excluded from listing
|
||||
// e.g. array('myfile.html', 'personal-folder', '*.php', ...)
|
||||
$exclude_items = array();
|
||||
$exclude_items = array('');
|
||||
|
||||
// Online office Docs Viewer
|
||||
// Availabe rules are 'google', 'microsoft' or false
|
||||
@@ -107,7 +97,7 @@ $sticky_navbar = true;
|
||||
|
||||
|
||||
// max upload file size
|
||||
$max_upload_size_bytes = 2048;
|
||||
$max_upload_size_bytes = 5000;
|
||||
|
||||
// Possible rules are 'OFF', 'AND' or 'OR'
|
||||
// OFF => Don't check connection IP, defaults to OFF
|
||||
File diff suppressed because one or more lines are too long
1189
translation.json
1189
translation.json
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user