From e8d914b6a32b9e8933cf6a376aa1b2609f24992c Mon Sep 17 00:00:00 2001 From: missinglink Date: Fri, 3 Apr 2020 11:06:28 +0200 Subject: [PATCH] docs(readme): simplify quick-start docs --- .gitignore | 1 + README.md | 31 ++++++++++++++++--------------- 2 files changed, 17 insertions(+), 15 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..3d91ccad --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +projects/*/data diff --git a/README.md b/README.md index fd4b1141..dc855fe7 100644 --- a/README.md +++ b/README.md @@ -31,32 +31,34 @@ At least 8GB RAM is required. The following shell script can be used to quickly get started with a Pelias build. -Feel free to modify the code and data locations to suit your needs. - ```bash #!/bin/bash set -x -# create directories -mkdir /code /data - -# set proper permissions. make sure the user matches your `DOCKER_USER` setting in `.env` -chown 1000:1000 /code /data +# change directory to the where you would like to install Pelias +# cd /path/to/install -# clone repo -cd /code -git clone https://github.com/pelias/docker.git -cd docker +# clone this repository +git clone https://github.com/pelias/docker.git && cd docker # install pelias script ln -s "$(pwd)/pelias" /usr/local/bin/pelias -# cwd +# cd into the project directory cd projects/portland-metro -# configure environment +# create a directory to store Pelias data files +# see: https://github.com/pelias/docker#variable-data_dir +# note: use 'gsed' instead of 'sed' on a Mac +mkdir ./data sed -i '/DATA_DIR/d' .env -echo 'DATA_DIR=/data' >> .env +echo 'DATA_DIR=./data' >> .env + +# configure docker to write files as your local user +# see: https://github.com/pelias/docker#variable-docker_user +# note: use 'gsed' instead of 'sed' on a Mac +sed -i '/DOCKER_USER/d' .env +echo "DOCKER_USER=$(id -u)" >> .env # run build pelias compose pull @@ -72,7 +74,6 @@ pelias compose up pelias test run ``` - ## Installing the Pelias helper script This repository makes use of a helper script to make basic management of the Pelias Docker images easy.