🔨 Updated Makefile

This commit is contained in:
Guillaume Jacquenot 2019-12-22 21:49:04 +01:00
parent 637e821888
commit e0f7438dab

View File

@ -1,12 +1,18 @@
.PHONY: build push test .PHONY: build push test
DOCKER_IMAGE=overv/openstreetmap-tile-server
build: build:
docker build -t overv/openstreetmap-tile-server . docker build -t ${DOCKER_IMAGE} .
push: build push: build
docker push overv/openstreetmap-tile-server:latest docker push ${DOCKER_IMAGE}:latest
test: build test: build
docker volume create openstreetmap-data docker volume create openstreetmap-data
docker run -v openstreetmap-data:/var/lib/postgresql/12/main overv/openstreetmap-tile-server import docker run --rm -v openstreetmap-data:/var/lib/postgresql/12/main ${DOCKER_IMAGE} import
docker run -v openstreetmap-data:/var/lib/postgresql/12/main -p 80:80 -d overv/openstreetmap-tile-server run docker run --rm -v openstreetmap-data:/var/lib/postgresql/12/main -p 80:80 -d ${DOCKER_IMAGE} run
stop:
docker rm -f `docker ps | grep '${DOCKER_IMAGE}' | awk '{ print $$1 }'` || true
docker volume rm -f openstreetmap-data