Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
SathiraSriSathsara authored Apr 27, 2023
1 parent e123d5e commit 1b79437
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,26 @@ This is a simple file browser written in PHP that allows you to navigate through

To use this file browser, you need to have PHP installed on your server. You can download the PHP files and copy them to your server's directory. Then, you can access the file browser by opening the `index.php` file in your web browser.

## Deploy by Docker

This Dockerfile uses the official `php:7.4-apache` image as the base image, and installs the necessary PHP extensions and dependencies required to run the file browser. It then copies the contents of the current directory to the `/var/www/html/` directory in the container, which is where the Apache web server looks for files to serve.

You can build a Docker image by running the `docker build` command in the same directory as the Dockerfile. For example, if you saved the Dockerfile in a directory called "my-app", you can build the Docker image by running:

```
cd my-app
docker build -t my-app-image .
```

This will build a Docker image with the tag "my-app-image" using the Dockerfile in the current directory. You can then run a container using this image by running:

When you build and run the container using this Dockerfile, the file browser should be accessible on port 80 of the container's IP address or hostname.

```
docker run -p 8080:80 my-app-image
```
This will start a container using the "my-app-image" image and map port 80 in the container to port 8080 on the host machine. You can then access the application in your web browser by navigating to **localhost:8080**.

## Usage

The file browser displays the current directory path at the top of the page, and a table of files and folders with their types and sizes. You can navigate through your files and directories by clicking on the folder names. To create a new folder, enter a name in the input field and click the "Create" button. To upload a file, click the "Choose File" button and select a file from your computer, then click the "Upload" button. To rename or delete a file/folder, enter the new name (if renaming) or click the "Delete" button (if deleting), and then click the corresponding button.
Expand Down

0 comments on commit 1b79437

Please sign in to comment.