This repository has been archived on 2023-02-05. You can view files and clone it, but cannot push or open issues or pull requests.
loki/Makefile

127 lines
3.1 KiB
Makefile
Raw Normal View History

2018-01-24 23:46:39 +01:00
# -----------------------------------------------------------------------------
# Install the service file.
# -----------------------------------------------------------------------------
install:
cp loki-server.service /lib/systemd/system/
systemctl daemon-reload
systemctl enable loki-server
uninstall:
systemctl disable loki-server
rm /lib/systemd/system/loki-server.service
systemctl daemon-reload
#------------------------------------------------------------------------------
# The container engine to use. Default to docker, but on Fedora must now use
# podman.
# ------------------------------------------------------------------------------
ENGINE = docker
# -----------------------------------------------------------------------------
# The container registry to use.
# -----------------------------------------------------------------------------
REGISTRY = registry.wojciechkozlowski.eu/wojtek/loki
# -----------------------------------------------------------------------------
# Default target.
# -----------------------------------------------------------------------------
default: all
2019-07-28 18:52:37 +02:00
# -----------------------------------------------------------------------------
# html
# -----------------------------------------------------------------------------
HTML = $(REGISTRY)/html
2019-07-28 18:52:37 +02:00
html-clean:
$(ENGINE) rmi $(HTML) || /bin/true
2019-07-28 18:52:37 +02:00
html-build:
$(ENGINE) build -f html/Dockerfile -t $(HTML) ./html
2019-07-28 18:52:37 +02:00
html-push:
$(ENGINE) push $(HTML)
2019-07-28 18:52:37 +02:00
html-pull:
$(ENGINE) pull $(HTML)
2019-07-28 18:52:37 +02:00
html: html-clean html-build html-push
# -----------------------------------------------------------------------------
# proxy
# -----------------------------------------------------------------------------
PROXY = $(REGISTRY)/proxy
2018-12-18 01:39:51 +01:00
proxy-clean:
$(ENGINE) rmi $(PROXY) || /bin/true
proxy-build:
$(ENGINE) build -f proxy/Dockerfile -t $(PROXY) ./proxy
proxy-push:
$(ENGINE) push $(PROXY)
proxy-pull:
$(ENGINE) pull $(PROXY)
proxy: proxy-clean proxy-build proxy-push
2018-12-18 01:39:51 +01:00
# -----------------------------------------------------------------------------
# nextcloud
# -----------------------------------------------------------------------------
2018-01-25 22:21:17 +01:00
NEXTCLOUD = $(REGISTRY)/nextcloud
2018-01-25 22:21:17 +01:00
2018-12-18 01:39:51 +01:00
nextcloud-clean:
$(ENGINE) rmi $(NEXTCLOUD) || /bin/true
2018-01-25 22:21:17 +01:00
2018-12-18 01:39:51 +01:00
nextcloud-build:
$(ENGINE) build -f nextcloud/Dockerfile -t $(NEXTCLOUD) ./nextcloud
2018-01-25 22:21:17 +01:00
2018-12-18 01:39:51 +01:00
nextcloud-push:
$(ENGINE) push $(NEXTCLOUD)
2018-01-25 22:21:17 +01:00
2018-12-18 01:39:51 +01:00
nextcloud-pull:
$(ENGINE) pull $(NEXTCLOUD)
2018-01-25 22:21:17 +01:00
2018-12-18 01:39:51 +01:00
nextcloud: nextcloud-clean nextcloud-build nextcloud-push
# -----------------------------------------------------------------------------
# Collect targets.
# -----------------------------------------------------------------------------
clean-all:
$(ENGINE) container prune -f
$(ENGINE) image prune -a -f
2018-01-25 22:21:17 +01:00
clean-builds: \
2019-07-28 18:52:37 +02:00
html-clean \
2018-01-25 22:21:17 +01:00
proxy-clean \
2019-07-28 11:02:11 +02:00
nextcloud-clean
2018-12-18 01:39:51 +01:00
build-all: \
2019-07-28 18:52:37 +02:00
html-build \
2018-12-18 01:39:51 +01:00
proxy-build \
2019-07-28 11:02:11 +02:00
nextcloud-build
2018-12-18 01:39:51 +01:00
push-all: \
2019-07-28 18:52:37 +02:00
html-push \
2018-12-18 01:39:51 +01:00
proxy-push \
2019-07-28 11:02:11 +02:00
nextcloud-push
2018-12-18 01:39:51 +01:00
pull-all: \
2019-07-28 18:52:37 +02:00
html-pull \
2018-12-18 01:39:51 +01:00
proxy-pull \
2019-07-28 11:02:11 +02:00
nextcloud-pull
# -----------------------------------------------------------------------------
# Clean - build - push
# -----------------------------------------------------------------------------
all: clean-all build-all push-all