Skip to content

Commit

Permalink
Docker support
Browse files Browse the repository at this point in the history
Fixes #27
Closes gh-30
  • Loading branch information
mrjoelkemp committed Jan 19, 2015
1 parent 7ee974f commit 0d95d07
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 7 deletions.
1 change: 1 addition & 0 deletions Dockerfile
@@ -0,0 +1 @@
FROM eboraas/apache-php
23 changes: 16 additions & 7 deletions README.md
Expand Up @@ -20,6 +20,22 @@ This has, of course, crippled the tool a bit – as you can't run code that has

### Running it locally

#### Vagrant

If you use vagrant, you can `vagrant up` within the phpepl root. This will spawn a virtual machine serving phpepl
at the `http://phpepl.dev` address.

You can also do `vagrant plugin install vagrant-hostsupdater` if you need to fetch the hostname from `/etc/hosts` or another host file.

#### Docker

If you use Docker, you can run `./docker-bootstrap` to start a container that serves the app using PHP5 and Apache.

To view the served app, visit the IP address of the host. Note, if you're using boot2docker, you need to visit the ip
found via the `boot2dock ip` command.

#### Manually

To serve this application locally, you'll need any php-capable web server:

* Mac: [MAMP](http://www.mamp.info/en/index.html)
Expand All @@ -35,13 +51,6 @@ You can then point your web server to serve files from the `phpepl/` root folder

You'll then have free reign to execute any commands.

#### Vagrant

If you use vagrant, you can `vagrant up` within the phpepl root. This will spawn a virtual machine serving phpepl
at the `http://phpepl.dev` address.

You can also do `vagrant plugin install vagrant-hostsupdater` if you need to fetch the hostname from `/etc/hosts` or another host file.

### Contact Me

If you hit any errors or if someone hacked the repl and it goes down, give
Expand Down
3 changes: 3 additions & 0 deletions docker-bootstrap.sh
@@ -0,0 +1,3 @@
#!/bin/bash

docker run -p 80:80 -v $(pwd):/var/www/ -d eboraas/apache-php

0 comments on commit 0d95d07

Please sign in to comment.