From f2a8c8a0c5bcc055a5a9f90e4f01099e790ff145 Mon Sep 17 00:00:00 2001 From: Fabrizio Lungo Date: Sat, 20 Jan 2018 17:49:39 +0000 Subject: [PATCH] Fixed Docker script and README Updated the Docker script to start the site correctly. The DIR variable was not being used in each place which it should have been used and this has allowed the removal of the `readlink -f` command which had compatibility issues with MacOS (#297). The README did not have the change in name for the docker script reflected in all references so this has also been corrected. --- README.md | 2 +- docker.sh | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 7bbeecb6..ea6eaa60 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ You can also run the development server using docker: - Run `./docker.sh` from the project root - Access [localhost:8000](http://localhost:8000) in your browser -Both the `dev.sh` and `dev-docker.sh` scripts will initialise a configuration based on `data/config.php.example` if `data/config.php` does not exist. +Both the `dev.sh` and `docker.sh` scripts will initialise a configuration based on `data/config.php.example` if `data/config.php` does not exist. To run remotely, simply install PHP and configure Apache or your server of choice to serve `web/index.php`. diff --git a/docker.sh b/docker.sh index e5bb466e..2a2d9ab6 100755 --- a/docker.sh +++ b/docker.sh @@ -3,14 +3,14 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -if [ ! -e "data/config.php" ]; then +if [ ! -e "$DIR/data/config.php" ]; then cp "$DIR/data/config.php.example" "$DIR/data/config.php" fi docker run --rm -it --name "dev.lbry.io" \ - -v "$(readlink -f .):/usr/src/lbry.io" \ + -v "$DIR:/usr/src/lbry.io" \ -w "/usr/src/lbry.io" \ -p "127.0.0.1:8000:8000" \ -u "$(id -u):$(id -g)" \ php:7-alpine \ - php --server "0.0.0.0:8000" --docroot "web/" "web/index.php" + php --server "0.0.0.0:8000" --docroot "web/" "index.php"