Remove Makefile as now everything is Docker Compose based

pull/36/head
Lukas Martinelli 2015-10-15 14:23:22 +02:00
rodzic 15fd4f974a
commit 07d596acd0
1 zmienionych plików z 0 dodań i 50 usunięć

Wyświetl plik

@ -1,50 +0,0 @@
NAMESPACE = osm2vectortiles
POSTGIS_IMAGE = $(NAMESPACE)/postgis
IMPOSM_IMAGE = $(NAMESPACE)/imposm3
CWD = $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
PGDATA_DIR = $(CWD)/pgdata
IMPORT_DATA_DIR = $(CWD)/import
IMPORT_CACHE_DIR = $(CWD)/cache
OSM_DB = "osm_zurich"
OSM_USER = "osm"
OSM_PASSWORD = "7G@VNDYa&Zp<726x"
ZURICH_PBF = https://s3.amazonaws.com/metro-extracts.mapzen.com/zurich_switzerland.osm.pbf
postgis:
docker build -t $(POSTGIS_IMAGE) ./database/postgis
imposm3:
docker build -t $(IMPOSM_IMAGE) ./database/imposm3
docker: postgis imposm3
prepare:
mkdir -p $(PGDATA_DIR); \
mkdir -p $(IMPORT_DATA_DIR); \
mkdir -p $(IMPORT_CACHE_DIR);
build: docker
import: prepare docker
wget --directory-prefix $(IMPORT_DATA_DIR) --no-clobber $(ZURICH_PBF); \
docker run --name postgis \
-v $(PGDATA_DIR):/var/lib/postgresql/data \
-e OSM_DB=$(OSM_DB) \
-e OSM_USER=$(OSM_USER) \
-e OSM_PASSWORD=$(OSM_PASSWORD) \
-d $(POSTGIS_IMAGE); \
echo "Wait until PostGIS is initialized"; \
sleep 20; \
docker logs postgis; \
docker run --rm --name imposm \
-v $(IMPORT_DATA_DIR):/data/import \
-v $(IMPORT_CACHE_DIR):/data/cache \
--link postgis:db \
-e OSM_DB=$(OSM_DB) \
-e OSM_USER=$(OSM_USER) \
-e OSM_PASSWORD=$(OSM_PASSWORD) \
osm2vectortiles/imposm3
default: build