<commit_before># ustcmirror-images

[![Build Status](https://travis-ci.org/ustclug/ustcmirror-images.svg?branch=master)](https://travis-ci.org/ustclug/ustcmirror-images)

- [Introduction](#introduction)
- [TODO](#todo)
- [Configuration](#configuration)
    - [Volumes](#volumes)
    - [Common Configuration Parameters](#common-configuration-parameters)
    - [rsync](#rsync)
    - [lftpsync](#lftpsync)
    - [gitsync](#gitsync)
- [Other Images](#other-images)
    - [MongoDB](#mongodb)

# Introduction

Docker images used by [ustcmirror](https://github.com/ustclug/ustcmirror)

# TODO

* [ ] Support ftpsync

# Configuration

### Volumes

* `/data`: The mount point of the repository on the host. `export TO=/data` in `entry.sh`.
* `/log`: The mount point of the host directory that save logs. `export LOGDIR=/log` in `entry.sh`.

### Common Configuration Parameters

| Parameter | Description |
|-----------|-------------|
| `DEBUG` | Set this to `true` to enable debugging. |
| `BIND_ADDRESS` | Set the local ip to be bound. |
| `OWNER` | Recommended to specify `$uid:$gid`. Defaults to `0:0`. |

### rsync

| Parameter | Description |
|-----------|-------------|
| `RSYNC_HOST` | The hostname of the remote server. |
| `RSYNC_USER` | (Optional) No defaults. |
| `RSYNC_PASSWORD` | (Optional) No defaults. |
| `RSYNC_PATH` | The destination path on the remote server. |
| `RSYNC_BW` | Bandwidth limit. Defaults to `0`. |
| `RSYNC_OPTIONS` | Extra options. Defaults to `-4pPrltvHSB8192 --partial-dir=.rsync-partial --timeout 14400 --delay-updates --safe-links --delete-delay --delete-excluded`. |
| `RSYNC_EXCLUDE` | Files to be excluded. Defaults to `--exclude .~tmp~/`. |
| `RSYNC_MAXDELETE` | Maximum number of files that can be removed. Defaults to `4000`. |

### lftpsync<commit_msg>[skip ci]: Update README<commit_after># ustcmirror-images

[![Build Status](https://travis-ci.org/ustclug/ustcmirror-images.svg?branch=master)](https://travis-ci.org/ustclug/ustcmirror-images)

- [Introduction](#introduction)
- [TODO](#todo)
- [Configuration](#configuration)
    - [Volumes](#volumes)
    - [Common Configuration Parameters](#common-configuration-parameters)
    - [rsync](#rsync)
    - [lftpsync](#lftpsync)
    - [gitsync](#gitsync)
- [Other Images](#other-images)
    - [MongoDB](#mongodb)

# Introduction

Docker images used by [ustcmirror](https://github.com/ustclug/ustcmirror)

# TODO

* [ ] Support ftpsync

# Configuration

### Volumes

* `/data`: The mount point of the repository on the host. `export TO=/data` in `entry.sh`.
* `/log`: The mount point of the host directory that save logs. `export LOGDIR=/log` in `entry.sh`.

### Common Configuration Parameters

| Parameter | Description |
|-----------|-------------|
| `DEBUG` | Set this to `true` to enable debugging. |
| `PREFER_IPV6` | Set this to `true` to bind IPV6 address. |
| `BIND_ADDRESS` | Set the local ip to be bound. |
| `OWNER` | Recommended to specify `$uid:$gid`. Defaults to `0:0`. |

### rsync

| Parameter | Description |
|-----------|-------------|
| `RSYNC_HOST` | The hostname of the remote server. |
| `RSYNC_USER` | (Optional) No defaults. |
| `RSYNC_PASSWORD` | (Optional) No defaults. |
| `RSYNC_PATH` | The destination path on the remote server. |
| `RSYNC_BW` | Bandwidth limit. Defaults to `0`. |
| `RSYNC_EXTRA_OPTS` | Extra options. Defaults to empty. |
| `RSYNC_EXCLUDE` | Files to be excluded. Defaults to `--exclude .~tmp~/`. |
| `RSYNC_BLKSIZE` | Defaults to `8192`. |
| `RSYNC_TIMEOUT` | Defaults to `14400`. |
| `RSYNC_DELAY_UPDATES` | Defaults to `true`. |
| `RSYNC_MAXDELETE` | Maximum number of files that can be removed. Defaults to `4000`. |

### lftpsync
{'fraction_non_alphanumeric': 0.18424638866176068, 'fraction_numerical': 0.009539384028345598, 'mean_word_length': 3.681122448979592, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '155292', 'n_tokens_mistral': 1311, 'n_tokens_neox': 1252, 'n_words': 322}