Skip to content

Commit

Permalink
Bump version and update the documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
Burgy Benjamin committed Nov 21, 2023
1 parent 0f1a422 commit 62a67cf
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 8 deletions.
41 changes: 37 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,44 @@
# KdriveBridge

The goal of this project is to provide access to the content of your files saved in kDrive. This application doesn't offer any security layers or authentication. I suggest using a [proxy](https://docs.linuxserver.io/general/swag/) for TLS termination and authentication in front of the project.
The goal of this project is to provide access to the content of your files saved in kDrive without the KSuite layer by calling the URL:

## Installation
```
http://localhost:4000/files/<your-kdrive-file-id>
```

With Docker, running the application is a breeze. Simply update the environment variables SECRET_KEY_BASE, PHX_HOST, KDRIVE_ID, and KDRIVE_API_TOKEN. Then, execute the following command to kickstart the application.
## Configuration

| Environment variables | Description |
|-----------------------|------------------------------------------------------------------------------------------------------------------------------|
| KDRIVE_ID | The identifier of your KDrive. |
| KDRIVE_API_TOKEN | The API token to use the KDrive API. |
| PHX_HOST | The host the web server. (default: example.com) |
| PORT | The port for the web server. (default: 4000) |
| SECRET_KEY_BASE | Secret key used by the [phoenix framework](https://hexdocs.pm/phoenix/deployment.html#handling-of-your-application-secrets). |

```yaml
version: '3'
services:
kdrive-bridge:
image: minidfx/kdrive-bridge:v0.3.0
environment:
- SECRET_KEY_BASE=<secret>
- PHX_HOST=<host>
- PORT=<port>
- KDRIVE_ID=<id>
- KDRIVE_API_TOKEN=<token>
ports:
- 4000:4000
```
## Running with Docker (recommended way)
With Docker, running the application is a breeze. Simply update the environment variables SECRET_KEY_BASE, PHX_HOST, KDRIVE_ID, and KDRIVE_API_TOKEN. Then, run it to kickstart the application.
```bash
docker-compose up
```
```

## Security considerations

This application doesn't offer any security layers or authentication. I suggest using a [proxy](https://docs.linuxserver.io/general/swag/) for TLS termination and authentication in front of the container. Make sure to protect this resource by yourself.
2 changes: 1 addition & 1 deletion config/runtime.exs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ if config_env() == :prod do
config :kdrive_bridge, :dns_cluster_query, System.get_env("DNS_CLUSTER_QUERY")

config :kdrive_bridge, KdriveBridgeWeb.Endpoint,
url: [host: host, port: 443, scheme: "https"],
url: [host: host, port: 443, scheme: "http"],
http: [
# Enable IPv6 and bind on all interfaces.
# Set it to {0, 0, 0, 0, 0, 0, 0, 1} for local network only access.
Expand Down
5 changes: 3 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ version: '3'
services:
kdrive-bridge:
build: .
image: minidfx/kdrive-bridge:v0.2.0
image: minidfx/kdrive-bridge:v0.3.0
environment:
- SECRET_KEY_BASE=<secret>
- PHX_HOST=<host>
- PORT=<port>
- KDRIVE_ID=<id>
- KDRIVE_API_TOKEN=<token>
ports:
- 4000:4000
- 4000:4000
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ defmodule KdriveBridge.MixProject do
def project do
[
app: :kdrive_bridge,
version: "0.2.0",
version: "0.3.0",
elixir: "~> 1.14",
elixirc_paths: elixirc_paths(Mix.env()),
start_permanent: Mix.env() == :prod,
Expand Down

0 comments on commit 62a67cf

Please sign in to comment.