Skip to content

Instantly share code, notes, and snippets.

@mrsimonemms
Created July 3, 2020 21:38
Show Gist options
  • Save mrsimonemms/7e8caf9f9722e28a1b72e24664022b66 to your computer and use it in GitHub Desktop.
Save mrsimonemms/7e8caf9f9722e28a1b72e24664022b66 to your computer and use it in GitHub Desktop.
OpenApiary Makefile
CONTAINER_NAME ?= open-apiary
TAG ?= develop
IMAGE = registry.gitlab.com/mrsimonemms/open-apiary:${TAG}
destroy:
docker stop ${CONTAINER_NAME} || true
docker rm ${CONTAINER_NAME} || true
.PHONY: destroy
deploy:
mkdir -p ./data
docker run \
-d \
--restart=always \
--name ${CONTAINER_NAME} \
-e DB_TYPE=sqlite \
-e DB_NAME=/data/data.sql \
-e WEATHER_API_KEY="<insert>" \
-e JWT_SECRET="<insert>" \
-v ${PWD}/data:/data \
-v ${PWD}/data/uploads:/uploads \
-p 3000:3000 \
${IMAGE}
.PHONY: deploy
update:
docker pull ${IMAGE}
$(MAKE) destroy
$(MAKE) deploy
.PHONY: update
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment