overleaf/server-ce/Makefile
Alf Eaton 51a068b707 Merge pull request #12603 from overleaf/ae-make-all
Add "all" target to server-ce Makefile

GitOrigin-RevId: 9ca8fac603e28793490cc9b8dc3f86b96719e520
2023-04-19 08:02:59 +00:00

22 lines
786 B
Makefile

# Makefile
export SHARELATEX_BASE_TAG := sharelatex/sharelatex-base
export SHARELATEX_TAG := sharelatex/sharelatex
export SHARELATEX_BASE_CACHE := $(shell echo $(SHARELATEX_BASE_TAG) | sed -E 's/(.+):.+/\1:latest/')
export MONOREPO_REVISION := $(shell git rev-parse HEAD)
MONOREPO_ROOT := ../
all: build-base build-community
build-base:
cp .dockerignore $(MONOREPO_ROOT)
docker pull $(SHARELATEX_BASE_CACHE) || echo "nothing cached yet"
docker build -f Dockerfile-base --pull --cache-from $(SHARELATEX_BASE_CACHE) -t $(SHARELATEX_BASE_TAG) $(MONOREPO_ROOT)
build-community:
cp .dockerignore $(MONOREPO_ROOT)
docker build --build-arg SHARELATEX_BASE_TAG --build-arg MONOREPO_REVISION -f Dockerfile -t $(SHARELATEX_TAG) $(MONOREPO_ROOT)
.PHONY: all build-base build-community