overleaf/server-ce/Makefile

23 lines
768 B
Makefile
Raw Normal View History

2017-02-22 04:23:01 -05:00
# Makefile
export OVERLEAF_BASE_TAG := sharelatex/sharelatex-base
export OVERLEAF_TAG := sharelatex/sharelatex
export OVERLEAF_BASE_CACHE := $(shell echo $(OVERLEAF_BASE_TAG) | sed -E 's/(.+):.+/\1:latest/')
export MONOREPO_REVISION := $(shell git rev-parse HEAD)
MONOREPO_ROOT := ../
2017-02-22 04:23:01 -05:00
all: build-base build-community
2017-02-22 04:23:01 -05:00
build-base:
cp .dockerignore $(MONOREPO_ROOT)
docker pull $(OVERLEAF_BASE_CACHE) || echo "nothing cached yet"
docker build -f Dockerfile-base --pull --cache-from $(OVERLEAF_BASE_CACHE) -t $(OVERLEAF_BASE_TAG) $(MONOREPO_ROOT)
2017-02-22 04:23:01 -05:00
build-community:
cp .dockerignore $(MONOREPO_ROOT)
docker build --build-arg OVERLEAF_BASE_TAG --build-arg MONOREPO_REVISION -f Dockerfile -t $(OVERLEAF_TAG) $(MONOREPO_ROOT)
2017-02-22 04:23:01 -05:00
.PHONY: all build-base build-community