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