Created
July 3, 2020 21:38
-
-
Save mrsimonemms/7e8caf9f9722e28a1b72e24664022b66 to your computer and use it in GitHub Desktop.
OpenApiary Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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