<commit_before>This dockerfile provides a ready-to-go Baikal server.

For more details, see https://github.com/ckulka/baikal-docker

### Supported Tags

I follow the same naming scheme for the images as [Baikal](http://baikal-server.com/) themselves:
 - [latest](https://github.com/ckulka/baikal-docker/tree/master) (corresponds to 0.4.5)
 - [0.4.5](https://github.com/ckulka/baikal-docker/tree/0.4.5)
 - [0.2.7](https://github.com/ckulka/baikal-docker/tree/0.2.7)


### Run

The following command will run Baikal, including HTTPS over self-signed certificates:
```
docker run --rm -it -p 443:443 -p 443:443 ckulka/baikal
```
Alternatively, use the provided [docker-compose.yml](https://github.com/ckulka/baikal-docker/blob/master/docker-compose.yml) from the Git repository:
```
docker-compose up baikal
```

#### Systemd

I also included a [Systemd service file](https://github.com/ckulka/baikal-docker/blob/master/baikal.service).
```
sudo curl -o /etc/systemd/system/baikal.service https://github.com/ckulka/baikal-docker/blob/master/baikal.service
# Adjust the location of the docker-compose.yml

sudo systemctl enable baikal.service
```
This automatically starts the service.

### SSL Certificates

If you want to use your own certificates, either hide this container behind your own HTTPS proxy (e.g. nginx) or you mount your certificates into the container:
```
# The folder /etc/ssl/private/baikal contains the files baikal.public.pem and baikal.private.pem
docker run --rm -it -p 80:80 -p 443:443 -v /etc/my-certs/baikal:/etc/ssl/private/:ro ckulka/rpi-baikal
```<commit_msg>Added section about persistent data to README<commit_after>This dockerfile provides a ready-to-go Baikal server.

For more details, see https://github.com/ckulka/baikal-docker

### Supported Tags

I follow the same naming scheme for the images as [Baikal](http://baikal-server.com/) themselves:
 - [latest](https://github.com/ckulka/baikal-docker/tree/master) (corresponds to 0.4.5)
 - [0.4.5](https://github.com/ckulka/baikal-docker/tree/0.4.5)
 - [0.2.7](https://github.com/ckulka/baikal-docker/tree/0.2.7)


### Run

The following command will run Baikal, including HTTPS over self-signed certificates:
```
docker run --rm -it -p 443:443 -p 443:443 ckulka/baikal
```
Alternatively, use the provided [docker-compose.yml](https://github.com/ckulka/baikal-docker/blob/master/docker-compose.yml) from the Git repository:
```
docker-compose up baikal
```

#### Systemd

I also included a [Systemd service file](https://github.com/ckulka/baikal-docker/blob/master/baikal.service).
```
sudo curl -o /etc/systemd/system/baikal.service https://github.com/ckulka/baikal-docker/blob/master/baikal.service
# Adjust the location of the docker-compose.yml

sudo systemctl enable baikal.service
```
This automatically starts the service.

### Persistent Data

The image exposes the ```/var/www/baikal/Specific``` folder, which contains the persistent data. This folder should be part of a regular backup.

### SSL Certificates

If you want to use your own certificates, either hide this container behind your own HTTPS proxy (e.g. nginx) or you mount your certificates into the container:
```
# The folder /etc/ssl/private/baikal contains the files baikal.public.pem and baikal.private.pem
docker run --rm -it -p 80:80 -p 443:443 -v /etc/my-certs/baikal:/etc/ssl/private/:ro ckulka/rpi-baikal
```
{'fraction_non_alphanumeric': 0.13594538438705847, 'fraction_numerical': 0.021964974769961412, 'mean_word_length': 4.265625, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 14, 'lorem ipsum': 0, 'www.': 1, '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': '546142', 'n_tokens_mistral': 1261, 'n_tokens_neox': 1146, 'n_words': 312}