Skip to content

Commit 355a1eb

Browse files
authored
Merge pull request #186 from pelias/relative_data_dir
docs(readme): simplify quick-start docs
2 parents ea9d043 + a542af2 commit 355a1eb

File tree

2 files changed

+18
-16
lines changed

2 files changed

+18
-16
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
.DS_Store
1+
projects/*/data
2+
.DS_Store

README.md

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -54,32 +54,34 @@ At least 8GB RAM is required.
5454

5555
The following shell script can be used to quickly get started with a Pelias build.
5656

57-
Feel free to modify the code and data locations to suit your needs.
58-
5957
```bash
6058
#!/bin/bash
6159
set -x
6260

63-
# create directories
64-
mkdir /code /data
65-
66-
# set proper permissions. make sure the user matches your `DOCKER_USER` setting in `.env`
67-
chown 1000:1000 /code /data
61+
# change directory to the where you would like to install Pelias
62+
# cd /path/to/install
6863

69-
# clone repo
70-
cd /code
71-
git clone https://github.com/pelias/docker.git
72-
cd docker
64+
# clone this repository
65+
git clone https://github.com/pelias/docker.git && cd docker
7366

7467
# install pelias script
7568
ln -s "$(pwd)/pelias" /usr/local/bin/pelias
7669

77-
# cwd
70+
# cd into the project directory
7871
cd projects/portland-metro
7972

80-
# configure environment
73+
# create a directory to store Pelias data files
74+
# see: https://github.com/pelias/docker#variable-data_dir
75+
# note: use 'gsed' instead of 'sed' on a Mac
76+
mkdir ./data
8177
sed -i '/DATA_DIR/d' .env
82-
echo 'DATA_DIR=/data' >> .env
78+
echo 'DATA_DIR=./data' >> .env
79+
80+
# configure docker to write files as your local user
81+
# see: https://github.com/pelias/docker#variable-docker_user
82+
# note: use 'gsed' instead of 'sed' on a Mac
83+
sed -i '/DOCKER_USER/d' .env
84+
echo "DOCKER_USER=$(id -u)" >> .env
8385

8486
# run build
8587
pelias compose pull
@@ -95,7 +97,6 @@ pelias compose up
9597
pelias test run
9698
```
9799

98-
99100
## Installing the Pelias helper script
100101

101102
This repository makes use of a helper script to make basic management of the Pelias Docker images easy.

0 commit comments

Comments
 (0)