<commit_before># Kalabox

This project is currently under heavy development. The
documentation here is currently directed towards developers
working on the project.


## Developer Install
```
git clone https://github.com/kalabox/kalabox.git
cd kalabox
npm install

# link kbox executable
ln -s bin/kbox.js /usr/local/bin/kbox

# OSX
# Install Boot2Docker First
bin/setup_osx

# Ubuntu
# Install Docker First
bin/setup_linux
```

**Note:** DNS resolvers for '*.kbox` may need to be setup manually for now.

For OSX create a file at `/etc/resolver/kbox` and add the following line:
```
nameserver 192.168.3.11
```

Kalabox runs a nameserver on the Docker Host, and the goal here is to
add this as a nameserver to your system. As of right now, it's a little
spotty to do this programmatically.


## Run the D7 Example App profile
```
# Change directories
cd app_examples/d7-app

# Build all dependencies
kbox build

# Pull all dependencies (There aren't any in this example)
kbox pull

# Now that the images for this profile exist, we can initialize the app.
# Initializing creates app containers, but they are not started yet.
kbox init

# Start the containers
kbox start
```

If DNS is resolving correctly and all the containers were built and started,
you will be able to access your app in a browser at: http://d7-app.kbox

By default, there is only an index printing the output of `phpinfo();`.

You can run a couple commands provided by the d7 and drush plugins.

```
# Download Drupal 7 to the public directory
kbox d7.dl<commit_msg>Added directions to create a project directory outside of the kalabox project<commit_after># Kalabox

This project is currently under heavy development. The
documentation here is currently directed towards developers
working on the project.


## Developer Install
```
git clone https://github.com/kalabox/kalabox.git
cd kalabox
npm install

# link kbox executable
ln -s bin/kbox.js /usr/local/bin/kbox

# OSX
# Install Boot2Docker First
bin/setup_osx

# Ubuntu
# Install Docker First
bin/setup_linux
```

**Note:** DNS resolvers for '*.kbox` may need to be setup manually for now.

For OSX create a file at `/etc/resolver/kbox` and add the following line:
```
nameserver 192.168.3.11
```

Kalabox runs a nameserver on the Docker Host, and the goal here is to
add this as a nameserver to your system. As of right now, it's a little
spotty to do this programmatically.

## Make a project directory (to use the plugin system) and put the kalabox repo in that directory, then re-link your binary
```
cd ~/
mkdir kalaboxprojects
mv kalabox kalaboxprojects/
rm -rf /usr/local/bin/kbox
ln -s /Users/<username>/kalaboxprojects/kalabox/bin/kbox.js /usr/local/bin/kbox
```

## Run the D7 Example App profile
```
# Change directories
cd app_examples/d7-app

# Build all dependencies
kbox build

# Pull all dependencies (There aren't any in this example)
kbox pull

# Now that the images for this profile exist, we can initialize the app.
# Initializing creates app containers, but they are not started yet.
kbox init

# Start the containers
kbox start
```

If DNS is resolving correctly and all the containers were built and started,
you will be able to access your app in a browser at: http://d7-app.kbox

By default, there is only an index printing the output of `phpinfo();`.

You can run a couple commands provided by the d7 and drush plugins.

```
# Download Drupal 7 to the public directory
kbox d7.dl
{'fraction_non_alphanumeric': 0.07282260413632391, 'fraction_numerical': 0.00932129332944946, 'mean_word_length': 4.1101190476190474, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6008346', 'n_tokens_mistral': 1087, 'n_tokens_neox': 1010, 'n_words': 492}