<commit_before>Buddycloud ♥ Docker
===================

A dockerfile to run the Buddycloud stack. 
Please submit more.

Includes
* webclient
* API + xmpp-ftw
* buddycloud-server
* media server
* prosody server

## How this works

This Dockerfile setups a buddycloud stack with the following features:
* `config` directory contains a copy of all config files that are needed for a full stack.
* `-v somewhere-on-your-host-fs:/var/log/`

## Setup

* Install Docker on your system
* `git clone <EMAIL>:buddycloud/dockerfiles.git`
* `cd dockerfiles/buddycloud-stack`
* quickly configure the stack for your own domain using `find ./config -type f -exec sed -i -e 's/EXAMPLE.COM/mydomain.com/g' {} \;`
* `docker  build -t buddycloud-stack .`

## Running

Launch your process
```
docker run \
  -i \
  --dns 127.0.0.1 \
  -v /srv/buddycloud-stack/logs:/var/log/buddycloud \
  -v /srv/buddycloud-stack/prosody:/var/lib/prosody \
  -v /srv/buddycloud-stack/postgresql:/var/lib/postgresql \
  -v /srv/buddycloud-stack/buddycloud-media-server:/var/lib/buddycloud-media-server \
  -P -p 80:80 -p 443:443 -p 5269:5269 \
  -t buddycloud-stack
```

## Ways to run this

### A new domain (buddycloud.dev)

The existing Dockerfile will _just work_

The Dockerfile runs a nameserver that resolves the different buddycloud components. 

All you need to do is add `buddycloud.dev` resolve to `localhost`

```bash
echo "127.0.0.1 buddycloud.dev" >> /etc/hosts
```

### On am existing domain (your-domain.com)

Assuming you have an existing XMPP server you will need to...<commit_msg>Trying to make things clear<commit_after>Buddycloud ♥ Docker
===================

A dockerfile to run the Buddycloud stack components:
* Buddycloud web-app
* REST and webscocket http-API and xmpp-ftw
* Buddycloud Server
* Media Server
* a Prosody server (but can work against an existing server)

This Dockerfile configures a Buddycloud stack by copying the contents of the `config` directory into the container. It will also preserve your existing data using the Docker `VOLUME` and `-v` config and runtime options.

## Setup

* Install Docker on your system
* `git clone <EMAIL>:buddycloud/dockerfiles.git`
* `cd dockerfiles/buddycloud-stack`
* `docker  build -t buddycloud-stack .`

## Launching

Launch your process
```
docker run \
  -i \
  --dns 127.0.0.1 \
  -v /srv/buddycloud-stack/logs:/var/log/buddycloud \
  -v /srv/buddycloud-stack/prosody:/var/lib/prosody \
  -v /srv/buddycloud-stack/postgresql:/var/lib/postgresql \
  -v /srv/buddycloud-stack/buddycloud-media-server:/var/lib/buddycloud-media-server \
  -P -p 80:80 -p 443:443 -p 5269:5269 \
  -t buddycloud-stack
```

## Ways to run this

### buddycloud.dev (a testing domain)

The existing Dockerfile will _just work_

The Dockerfile runs a nameserver that resolves the different buddycloud components. 

All you need to do is add `buddycloud.dev` resolve to `localhost`

```bash
echo "127.0.0.1 buddycloud.dev" >> /etc/hosts
```

### your-domain.com (uses Dockerfile XMPP server)

Configure the stack for your own domain using `find ./config -type f -exec sed -i -e 's/buddycloud.dev/your-domain.com/g' {} \;`

* unconfigure the included bind server @abmar ???

### your-domain.com (runs against your existing XMPP server)

* configure the stack for your own domain using `find ./config -type f -exec sed -i -e 's/buddycloud.dev/mydomain.com/g' {} \;`
* change the existing components to point at your xmpp server... @abmar how?
{'fraction_non_alphanumeric': 0.12604799074877132, 'fraction_numerical': 0.017346053772766695, 'mean_word_length': 3.682002706359946, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 4, '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': '5149185', 'n_tokens_mistral': 1252, 'n_tokens_neox': 1155, 'n_words': 385}