2017-02-22 04:23:01 -05:00
|
|
|
# Makefile
|
|
|
|
|
2024-01-26 04:47:02 -05:00
|
|
|
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/')
|
2021-08-16 05:36:25 -04:00
|
|
|
export MONOREPO_REVISION := $(shell git rev-parse HEAD)
|
|
|
|
MONOREPO_ROOT := ../
|
2017-02-22 04:23:01 -05:00
|
|
|
|
2023-04-18 04:24:07 -04:00
|
|
|
all: build-base build-community
|
|
|
|
|
2017-02-22 04:23:01 -05:00
|
|
|
build-base:
|
2021-08-16 05:36:25 -04:00
|
|
|
cp .dockerignore $(MONOREPO_ROOT)
|
2024-01-26 04:47:02 -05:00
|
|
|
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:
|
2021-08-16 05:36:25 -04:00
|
|
|
cp .dockerignore $(MONOREPO_ROOT)
|
2024-01-26 04:47:02 -05:00
|
|
|
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
|
|
|
|
|
|
|
|
2023-04-18 04:24:07 -04:00
|
|
|
.PHONY: all build-base build-community
|