Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.DS_Store
projects/*/data
.DS_Store
31 changes: 16 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,32 +54,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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What would it take to write a command that works on both Mac and Linux?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably a doctorate in computer wizardry from Hogwarts 😸

echo "DOCKER_USER=$(id -u)" >> .env
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, why didn't we do this before!? So simple and obvious

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess the next step would be to make DOCKER_USER optional and have the scripts run id -u by default, thereby making the instructions even shorter.

I think that was the idea behind old work like #74, but it was a long time ago.


# run build
pelias compose pull
Expand All @@ -95,7 +97,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.
Expand Down