Skip to content

Commit

Permalink
Release 0.10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
hannesdejager committed May 10, 2020
1 parent 953fa4a commit 55638ca
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 28 deletions.
7 changes: 4 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "unftp"
version = "0.9.0"
version = "0.10.0"
authors = [
"Agoston Horvath <[email protected]>",
"Dávid Kosztka <[email protected]>",
Expand All @@ -18,7 +18,7 @@ readme = "README.md"

[dependencies]
async-trait = "0.1.30"
libunftp = {git = "https://github.com/bolcom/libunftp.git", rev = "1382781bf4a185acefbc7beecaecb36753566100"}
libunftp = "0.11.0"
log = "0.4"
env_logger = "0.6"
redis = "0.9.0"
Expand Down
24 changes: 9 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Example running an instance with a filesystem back-end and custom port
```sh
cargo run -- \
--root-dir=/home/unftp/data \
--bind-address=0.0.0.0:2100
--bind-address=0.0.0.0:2121
```

With FTPS enabled:
Expand All @@ -66,7 +66,7 @@ cargo run -- \
--ftps-key-file=/home/unftp/unftp.key
```

Enabling the [Prometheus](https://prometheus.io) exporter, binding to port 8080:
Enabling the [Prometheus](https://prometheus.io) exporter on (`http://../metrics`), binding to port 8080:

```sh
cargo run -- \
Expand All @@ -84,30 +84,24 @@ cargo run -- \
--sbe-gcs-key-file=file
```

## Docker
## Docker image

Dockerfile is templated. To get a list of available commands, run:
The project contains templated Dockerfiles . To get a list of available commands, run:

```sh
make
```

We offer 3 different options for building an unFTP docker image:

- `minimal`: an empty image containing a static build of unFTP. *WARNING*: this is broken right now, as Cargo can only compile static binary if all the dependent libraries is also statically built.
- `alpine` (default): build unftp in rust-slim and deploy in alpine. This image is built with musl instead of a full-blown libc. Resulting image is about 20MB.
- `full`: build & run on the rust-slim base. Resulting image is over 1GB.
- `scratch`
- `alpine` (default): build unftp in rust-slim and deploy in alpine. This image is built with musl instead of a full-blown libc.
- `alpine-debug`: build & run on the rust-slim base and adds some tools like libunftp

To build the default docker image:
To build the alpine docker image:

```sh
make docker-image
```

To build and run unFTP inside the default docker image in the foreground:

```sh
make docker-run
make docker-image-alpine
```

## Features
Expand Down
12 changes: 4 additions & 8 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -273,14 +273,10 @@ where

// Setup proxy protocol mode.
if let Some(port) = arg_matches.value_of(args::PROXY_EXTERNAL_CONTROL_PORT) {
let port_num = String::from(port).parse::<u16>().map_err(|e| {
format!(
"unable to parse proxy protocol external control port {}: {}",
port, e
)
})?;
server = server
.proxy_protocol_mode(port_num);
let port_num = String::from(port)
.parse::<u16>()
.map_err(|e| format!("unable to parse proxy protocol external control port {}: {}", port, e))?;
server = server.proxy_protocol_mode(port_num);
}

// Setup FTPS
Expand Down

0 comments on commit 55638ca

Please sign in to comment.