Skip to content

Instantly share code, notes, and snippets.

@Firefishy
Firefishy / docker-osm-me.sh
Created March 26, 2016 19:54
Quickstart for OSM in Docker
#!/bin/bash
set -e
type docker >/dev/null 2>&1 || { echo >&2 "error: docker is required. See: https://docs.docker.com/engine/installation/linux/"; exit 1; }
type docker-compose >/dev/null 2>&1 || { echo >&2 "error: docker-compose is required. See: https://docs.docker.com/compose/install/"; exit 1; }
[ ! -d cgimap ] && git clone --branch add-docker --depth 1 https://github.com/Firefishy/cgimap.git;
[ ! -d openstreetmap-website ] && git clone --branch add-docker --depth 1 https://github.com/Firefishy/openstreetmap-website.git
(cd cgimap && docker build -t openstreetmap/cgimap .)
(cd openstreetmap-website && docker-compose run --rm app bundle exec rake db:migrate)
(cd openstreetmap-website && docker-compose up)
# remove environment; cd openstreetmap-website ; docker-compose down